mirror of
				https://github.com/PabloMK7/citra.git
				synced 2025-10-31 05:40:04 +00:00 
			
		
		
		
	Merge generic part of Android microphone changes (#5624)
This commit is contained in:
		
							parent
							
								
									e6ef00b41d
								
							
						
					
					
						commit
						5f1eb7146d
					
				
					 5 changed files with 61 additions and 9 deletions
				
			
		|  | @ -86,7 +86,7 @@ void CubebInput::StartSampling(const Frontend::Mic::Parameters& params) { | |||
|     input_params.format = CUBEB_SAMPLE_S16LE; | ||||
|     input_params.rate = params.sample_rate; | ||||
| 
 | ||||
|     u32 latency_frames; | ||||
|     u32 latency_frames = 512; // Firefox default
 | ||||
|     if (cubeb_get_min_latency(impl->ctx, &input_params, &latency_frames) != CUBEB_OK) { | ||||
|         LOG_ERROR(Audio, "Could not get minimum latency"); | ||||
|     } | ||||
|  | @ -189,4 +189,11 @@ std::vector<std::string> ListCubebInputDevices() { | |||
|     cubeb_destroy(ctx); | ||||
|     return device_list; | ||||
| } | ||||
| 
 | ||||
| CubebFactory::~CubebFactory() = default; | ||||
| 
 | ||||
| std::unique_ptr<Frontend::Mic::Interface> CubebFactory::Create(std::string mic_device_name) { | ||||
|     return std::make_unique<CubebInput>(std::move(mic_device_name)); | ||||
| } | ||||
| 
 | ||||
| } // namespace AudioCore
 | ||||
|  |  | |||
|  | @ -31,4 +31,11 @@ private: | |||
| 
 | ||||
| std::vector<std::string> ListCubebInputDevices(); | ||||
| 
 | ||||
| class CubebFactory final : public Frontend::Mic::RealMicFactory { | ||||
| public: | ||||
|     ~CubebFactory() override; | ||||
| 
 | ||||
|     std::unique_ptr<Frontend::Mic::Interface> Create(std::string mic_device_name) override; | ||||
| }; | ||||
| 
 | ||||
| } // namespace AudioCore
 | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue