WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

Question regarding audrvMemPool #691

@ITotalJustice

Description

@ITotalJustice

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

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions