-
Notifications
You must be signed in to change notification settings - Fork 181
Open
Description
I had a bug in my music player where after a number of songs were played, it would fail to play new songs. I noticed that the id returned by audrvMemPoolAdd() is always increasing, even though i had called audrvMemPoolDetach() + audrvMemPoolRemove(). In my code, i allocate the mem poll for the single song that is loaded. When the song has finished, the voice + mempool are freed.
// cleanup code for voice + mempool.
audrvVoiceDrop(m_drv, m_voice_id);
audrvMemPoolDetach(m_drv, m_memory_pool_id);
audrvUpdate(m_drv);
// this returns false due to:
// https://github.com/switchbrew/libnx/blob/f6e45096aa4fc3f9cfd1b378742cd6e0fa3142a1/nx/source/audio/mempool.c#L26
audrvMemPoolRemove(m_drv, m_memory_pool_id);I can't see anywhere else that the mempool state is modified, so the state stays at AudioRendererMemPoolState_RequestDetach.
Am i using the api wrong? Or is this a bug?
Metadata
Metadata
Assignees
Labels
No labels