diff --git a/gc/asndlib.h b/gc/asndlib.h index d248c28b..ca555e1f 100644 --- a/gc/asndlib.h +++ b/gc/asndlib.h @@ -349,18 +349,18 @@ u32 ASND_GetTimerVoice(s32 voice); /*! \brief Tests if \a pointer is in use by \a voice as a buffer. * \param[in] voice Voice to test, from 0 to (MAX_VOICES-1). * \param[in] pointer Address to test. This must be the same pointer sent to ASND_AddVoice() or ASND_SetVoice(). - * \return SND_INVALID if invalid - * \return 0 if the pointer is unused - * \return 1 if the pointer used as a buffer. */ + * \return SND_INVALID if invalid. + * \return SND_OK if the pointer is unused. + * \return SND_BUSY if the pointer is used as a buffer. */ s32 ASND_TestPointer(s32 voice, void *pointer); /*! \brief Tests to determine if the \a voice is ready to receive a new buffer sample with ASND_AddVoice(). * \details You can use this function to block a reader when double buffering is used. It works similarly to ASND_TestPointer() without needing to pass a * pointer. * \param[in] voice Voice to test, from 0 to (MAX_VOICES-1). - * \return SND_INVALID - * \return 0 if voice is NOT ready to receive a new voice. - * \return 1 if voice is ready to receive a new voice with ASND_AddVoice(). */ + * \return SND_INVALID if invalid. + * \return SND_OK if voice is ready to receive a new buffer with ASND_AddVoice(). + * \return SND_BUSY if voice is NOT ready to receive a new buffer. */ s32 ASND_TestVoiceBufferReady(s32 voice); /*! @} */ diff --git a/libasnd/asndlib.c b/libasnd/asndlib.c index 3c5ed926..858f7823 100644 --- a/libasnd/asndlib.c +++ b/libasnd/asndlib.c @@ -582,10 +582,10 @@ s32 ASND_AddVoice(s32 voice, void *snd, s32 size_snd) s32 ASND_TestVoiceBufferReady(s32 voice) { - if(voice<0 || voice>=MAX_VOICES) return 0; // invalid voice: not ready (of course XD) - if(sound_data[voice].start_addr && sound_data[voice].start_addr2) return 0; // not ready + if(voice<0 || voice>=MAX_VOICES) return SND_INVALID; // invalid voice: not ready (of course XD) + if(sound_data[voice].start_addr && sound_data[voice].start_addr2) return SND_BUSY; // not ready - return 1; // ready + return SND_OK; // ready } /*------------------------------------------------------------------------------------------------------------------------------------------------------*/