constants.h | constants.h | |||
---|---|---|---|---|
skipping to change at line 109 | skipping to change at line 109 | |||
/** generic error */ | /** generic error */ | |||
FISH_SOUND_ERR_GENERIC = -1, | FISH_SOUND_ERR_GENERIC = -1, | |||
/** Not a valid FishSound* handle */ | /** Not a valid FishSound* handle */ | |||
FISH_SOUND_ERR_BAD = -2, | FISH_SOUND_ERR_BAD = -2, | |||
/** The requested operation is not suitable for this FishSound* handle */ | /** The requested operation is not suitable for this FishSound* handle */ | |||
FISH_SOUND_ERR_INVALID = -3, | FISH_SOUND_ERR_INVALID = -3, | |||
/** Out of memory */ | ||||
FISH_SOUND_ERR_OUT_OF_MEMORY = -4, | ||||
/** Functionality disabled at build time */ | /** Functionality disabled at build time */ | |||
FISH_SOUND_ERR_DISABLED = -10, | FISH_SOUND_ERR_DISABLED = -10, | |||
/** Too few bytes passed to fish_sound_identify() */ | /** Too few bytes passed to fish_sound_identify() */ | |||
FISH_SOUND_ERR_SHORT_IDENTIFY = -20, | FISH_SOUND_ERR_SHORT_IDENTIFY = -20, | |||
/** Comment violates VorbisComment restrictions */ | /** Comment violates VorbisComment restrictions */ | |||
FISH_SOUND_ERR_COMMENT_INVALID = -21 | FISH_SOUND_ERR_COMMENT_INVALID = -21 | |||
} FishSoundError; | } FishSoundError; | |||
End of changes. 1 change blocks. | ||||
0 lines changed or deleted | 3 lines changed or added | |||
decode.h | decode.h | |||
---|---|---|---|---|
skipping to change at line 82 | skipping to change at line 82 | |||
*/ | */ | |||
typedef int (*FishSoundDecoded_FloatIlv) (FishSound * fsound, float ** pcm, | typedef int (*FishSoundDecoded_FloatIlv) (FishSound * fsound, float ** pcm, | |||
long frames, void * user_data); | long frames, void * user_data); | |||
/** | /** | |||
* Set the callback for libfishsound to call when it has a block of decoded | * Set the callback for libfishsound to call when it has a block of decoded | |||
* PCM audio ready, and you want this provided as non-interleaved floats. | * PCM audio ready, and you want this provided as non-interleaved floats. | |||
* \param fsound A FishSound* handle (created with mode FISH_SOUND_DECODE) | * \param fsound A FishSound* handle (created with mode FISH_SOUND_DECODE) | |||
* \param decoded The callback to call | * \param decoded The callback to call | |||
* \param user_data Arbitrary user data to pass to the callback | * \param user_data Arbitrary user data to pass to the callback | |||
* \returns 0 on success, -1 on failure | * \retval 0 Success | |||
* \retval FISH_SOUND_ERR_BAD Not a valid FishSound* handle | ||||
* \retval FISH_SOUND_ERR_OUT_OF_MEMORY Out of memory | ||||
*/ | */ | |||
int fish_sound_set_decoded_float (FishSound * fsound, | int fish_sound_set_decoded_float (FishSound * fsound, | |||
FishSoundDecoded_Float decoded, | FishSoundDecoded_Float decoded, | |||
void * user_data); | void * user_data); | |||
/** | /** | |||
* Set the callback for libfishsound to call when it has a block of decoded | * Set the callback for libfishsound to call when it has a block of decoded | |||
* PCM audio ready, and you want this provided as interleaved floats. | * PCM audio ready, and you want this provided as interleaved floats. | |||
* \param fsound A FishSound* handle (created with mode FISH_SOUND_DECODE) | * \param fsound A FishSound* handle (created with mode FISH_SOUND_DECODE) | |||
* \param decoded The callback to call | * \param decoded The callback to call | |||
* \param user_data Arbitrary user data to pass to the callback | * \param user_data Arbitrary user data to pass to the callback | |||
* \returns 0 on success, -1 on failure | * \retval 0 Success | |||
* \retval FISH_SOUND_ERR_BAD Not a valid FishSound* handle | ||||
* \retval FISH_SOUND_ERR_OUT_OF_MEMORY Out of memory | ||||
*/ | */ | |||
int fish_sound_set_decoded_float_ilv (FishSound * fsound, | int fish_sound_set_decoded_float_ilv (FishSound * fsound, | |||
FishSoundDecoded_FloatIlv decoded, | FishSoundDecoded_FloatIlv decoded, | |||
void * user_data); | void * user_data); | |||
/** | /** | |||
* Decode a block of compressed data. | * Decode a block of compressed data. | |||
* No internal buffering is done, so a complete compressed audio packet | * No internal buffering is done, so a complete compressed audio packet | |||
* must be passed each time. | * must be passed each time. | |||
* \param fsound A FishSound* handle (created with mode FISH_SOUND_DECODE) | * \param fsound A FishSound* handle (created with mode FISH_SOUND_DECODE) | |||
skipping to change at line 116 | skipping to change at line 120 | |||
* \param bytes A count of bytes to decode (i.e. the length of buf) | * \param bytes A count of bytes to decode (i.e. the length of buf) | |||
* \returns The number of bytes consumed | * \returns The number of bytes consumed | |||
* \retval FISH_SOUND_ERR_STOP_OK Decoding was stopped by a FishSoundDecode * | * \retval FISH_SOUND_ERR_STOP_OK Decoding was stopped by a FishSoundDecode * | |||
* callback returning FISH_SOUND_STOP_OK before any input bytes were consum ed. | * callback returning FISH_SOUND_STOP_OK before any input bytes were consum ed. | |||
* This will occur when PCM is decoded from previously buffered input, and | * This will occur when PCM is decoded from previously buffered input, and | |||
* stopping is immediately requested. | * stopping is immediately requested. | |||
* \retval FISH_SOUND_ERR_STOP_ERR Decoding was stopped by a FishSoundDecod e* | * \retval FISH_SOUND_ERR_STOP_ERR Decoding was stopped by a FishSoundDecod e* | |||
* callback returning FISH_SOUND_STOP_ERR before any input bytes were consu med. | * callback returning FISH_SOUND_STOP_ERR before any input bytes were consu med. | |||
* This will occur when PCM is decoded from previously buffered input, and | * This will occur when PCM is decoded from previously buffered input, and | |||
* stopping is immediately requested. | * stopping is immediately requested. | |||
* \retval FISH_SOUND_ERR_BAD Not a valid FishSound* handle | ||||
* \retval FISH_SOUND_ERR_OUT_OF_MEMORY Out of memory | ||||
*/ | */ | |||
long fish_sound_decode (FishSound * fsound, unsigned char * buf, long bytes ); | long fish_sound_decode (FishSound * fsound, unsigned char * buf, long bytes ); | |||
#ifdef __cplusplus | #ifdef __cplusplus | |||
} | } | |||
#endif | #endif | |||
#endif /* __FISH_SOUND_DECODE_H__ */ | #endif /* __FISH_SOUND_DECODE_H__ */ | |||
End of changes. 3 change blocks. | ||||
2 lines changed or deleted | 8 lines changed or added | |||
deprecated.h | deprecated.h | |||
---|---|---|---|---|
skipping to change at line 45 | skipping to change at line 45 | |||
/** \file | /** \file | |||
* Deprecated interfaces | * Deprecated interfaces | |||
*/ | */ | |||
#ifdef __cplusplus | #ifdef __cplusplus | |||
extern "C" { | extern "C" { | |||
#endif | #endif | |||
/** | /** | |||
* DEPRECATED FUNCTION. | ||||
* Set the PCM format used by a FishSound object. The default value is | ||||
* non-interleaved. | ||||
* Prior to libfishsound 0.7.0, you would (optionally) specify whether you | ||||
* wanted to receive interleaved or per-channel PCM data using | ||||
* fish_sound_set_interleave(), the default being per-channel | ||||
* (non-interleaved) PCM. | ||||
* Whether or not your decoded callback expects interleaved or | ||||
* non-interleaved data is now implied by the particular | ||||
* fish_sound_set_decoded_TYPE() method you use to set it, such as | ||||
* fish_sound_set_decoded_float() or fish_sound_set_decode_float_ilv(). | ||||
* | ||||
* \param fsound A FishSound* handle | ||||
* \param interleave Whether to use interleaved PCM or not. Valid values ar | ||||
e | ||||
* 0 for non-interleaved, and 1 for interleaved. | ||||
* \retval 0 Success | ||||
* \retval -1 Invalid \a fsound | ||||
*/ | ||||
int fish_sound_set_interleave (FishSound * fsound, int interleave); | ||||
/** | ||||
* DEPRECATED TYPE. | * DEPRECATED TYPE. | |||
* Signature of a callback for libfishsound to call when it has decoded | * Signature of a callback for libfishsound to call when it has decoded | |||
* PCM audio data, and you want this provided as floats using the current | * PCM audio data, and you want this provided as floats using the current | |||
* interleave method as set by fish_sound_set_interleave(). | * interleave method as set by fish_sound_set_interleave(). | |||
*/ | */ | |||
typedef FishSoundDecoded_Float FishSoundDecoded; | typedef FishSoundDecoded_Float FishSoundDecoded; | |||
/** | /** | |||
* DEPRECATED FUNCTION. | * DEPRECATED FUNCTION. | |||
* Set the callback for libfishsound to call when it has a block of decoded | * Set the callback for libfishsound to call when it has a block of decoded | |||
skipping to change at line 102 | skipping to change at line 81 | |||
* DEPRECATED FUNCTION. | * DEPRECATED FUNCTION. | |||
* Set the PCM format used by a FishSound object. The default value is | * Set the PCM format used by a FishSound object. The default value is | |||
* non-interleaved. | * non-interleaved. | |||
* Prior to libfishsound 0.7.0, you would (optionally) specify whether you | * Prior to libfishsound 0.7.0, you would (optionally) specify whether you | |||
* wanted to receive interleaved or per-channel PCM data using | * wanted to receive interleaved or per-channel PCM data using | |||
* fish_sound_set_interleave(), the default being per-channel | * fish_sound_set_interleave(), the default being per-channel | |||
* (non-interleaved) PCM. | * (non-interleaved) PCM. | |||
* Whether or not your decoded callback expects interleaved or | * Whether or not your decoded callback expects interleaved or | |||
* non-interleaved data is now implied by the particular | * non-interleaved data is now implied by the particular | |||
* fish_sound_set_decoded_TYPE() method you use to set it, such as | * fish_sound_set_decoded_TYPE() method you use to set it, such as | |||
* fish_sound_set_decoded_float() or fish_sound_set_decode_float_ilv(). | * fish_sound_set_decoded_float() or fish_sound_set_decoded_float_ilv(). | |||
* | * | |||
* \param fsound A FishSound* handle | * \param fsound A FishSound* handle | |||
* \param interleave Whether to use interleaved PCM or not. Valid values ar e | * \param interleave Whether to use interleaved PCM or not. Valid values ar e | |||
* 0 for non-interleaved, and 1 for interleaved. | * 0 for non-interleaved, and 1 for interleaved. | |||
* \retval 0 Success | * \retval 0 Success | |||
* \retval -1 Invalid \a fsound | * \retval -1 Invalid \a fsound | |||
*/ | */ | |||
int fish_sound_set_interleave (FishSound * fsound, int interleave); | int fish_sound_set_interleave (FishSound * fsound, int interleave); | |||
/** | /** | |||
End of changes. 2 change blocks. | ||||
23 lines changed or deleted | 1 lines changed or added | |||
fishsound.h | fishsound.h | |||
---|---|---|---|---|
skipping to change at line 508 | skipping to change at line 508 | |||
* \returns 0 on success, -1 on failure | * \returns 0 on success, -1 on failure | |||
*/ | */ | |||
int fish_sound_command (FishSound * fsound, int command, void * data, | int fish_sound_command (FishSound * fsound, int command, void * data, | |||
int datasize); | int datasize); | |||
/** | /** | |||
* Query whether a FishSound object is using interleaved PCM | * Query whether a FishSound object is using interleaved PCM | |||
* \param fsound A FishSound* handle | * \param fsound A FishSound* handle | |||
* \retval 0 \a fsound uses non-interleaved PCM | * \retval 0 \a fsound uses non-interleaved PCM | |||
* \retval 1 \a fsound uses interleaved PCM | * \retval 1 \a fsound uses interleaved PCM | |||
* \retval -1 Invalid \a fsound | * \retval -1 Invalid \a fsound, or out of memory. | |||
*/ | */ | |||
int fish_sound_get_interleave (FishSound * fsound); | int fish_sound_get_interleave (FishSound * fsound); | |||
/** | /** | |||
* Query the current frame number of a FishSound object. | * Query the current frame number of a FishSound object. | |||
* | * | |||
* For decoding, this is the greatest frame index that has been decoded and | * For decoding, this is the greatest frame index that has been decoded and | |||
* made available to a FishSoundDecoded callback. This function is safe to | * made available to a FishSoundDecoded callback. This function is safe to | |||
* call from within a FishSoundDecoded callback, and corresponds to the fra me | * call from within a FishSoundDecoded callback, and corresponds to the fra me | |||
* number of the last frame in the current decoded block. | * number of the last frame in the current decoded block. | |||
End of changes. 1 change blocks. | ||||
1 lines changed or deleted | 1 lines changed or added | |||