| 42 | } |
| 43 | |
| 44 | void LibretroAudio::AudioThreadCallback() { |
| 45 | if (!enable_audio) |
| 46 | return; |
| 47 | |
| 48 | instance->LockMutex(); |
| 49 | instance->Decode(buffer.data(), samples_per_frame * 2 * 2); |
| 50 | instance->UnlockMutex(); |
| 51 | |
| 52 | RenderAudioFrames((const int16_t*)buffer.data(), samples_per_frame); |
| 53 | } |
| 54 | |
| 55 | void LibretroAudio::EnableAudio(bool enabled) { |
| 56 | enable_audio = enabled; |
nothing calls this directly
no test coverage detected