mirror of
				https://github.com/PabloMK7/citra.git
				synced 2025-10-30 21:30:04 +00:00 
			
		
		
		
	audio_core/lle: implement RecvData
This commit is contained in:
		
							parent
							
								
									7f568a3c19
								
							
						
					
					
						commit
						b609753fb6
					
				
					 2 changed files with 14 additions and 0 deletions
				
			
		|  | @ -9,8 +9,20 @@ namespace AudioCore { | |||
| 
 | ||||
| struct DspLle::Impl final { | ||||
|     Teakra::Teakra teakra; | ||||
| 
 | ||||
|     static constexpr unsigned TeakraSlice = 20000; | ||||
|     void RunTeakraSlice() { | ||||
|         teakra.Run(TeakraSlice); | ||||
|     } | ||||
| }; | ||||
| 
 | ||||
| u16 DspLle::RecvData(u32 register_number) { | ||||
|     while (!impl->teakra.RecvDataIsReady(register_number)) { | ||||
|         impl->RunTeakraSlice(); | ||||
|     } | ||||
|     return impl->teakra.RecvData(static_cast<u8>(register_number)); | ||||
| } | ||||
| 
 | ||||
| DspLle::DspLle() : impl(std::make_unique<Impl>()) {} | ||||
| DspLle::~DspLle() = default; | ||||
| 
 | ||||
|  |  | |||
|  | @ -13,6 +13,8 @@ public: | |||
|     DspLle(); | ||||
|     ~DspLle(); | ||||
| 
 | ||||
|     u16 RecvData(u32 register_number) override; | ||||
| 
 | ||||
| private: | ||||
|     struct Impl; | ||||
|     friend struct Impl; | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue