audiofilters: fix compilation warnings on iOS

parent 0a69ecb8
......@@ -55,7 +55,7 @@ typedef struct {
UInt32 max_bitrate;
} aac_rates_t;
/* The iOS AAC encoder supports different sampling rates and bitrates.
/* The iOS AAC encoder supports different sampling rates and bitrates.
These also depend on the type of encoder (with/without SBR).
*/
static aac_rates_t aac_rates[] = {
......@@ -189,9 +189,9 @@ static void enc_preprocess ( MSFilter *f ) {
ms_debug("get kAudioConverterPropertyMaximumOutputPacketSize to %d -> %x", (unsigned int)maxOutputSizePerPacket, (unsigned int)status);
ms_debug("AAC encoder set to: SR: %d mBitsPerChannel: %d mChannelsPerFrame: %d maxOutputPacketSize: %d bitrate: %d",
s->samplingRate,
(unsigned int)s->sourceFormat.mBitsPerChannel,
s->nchannels,
s->samplingRate,
(unsigned int)s->sourceFormat.mBitsPerChannel,
s->nchannels,
(unsigned int)s->maxOutputPacketSize,
s->bitRate);
}
......@@ -273,7 +273,7 @@ static void enc_process ( MSFilter *f ) {
/* start the encoding process, iOS will call back when ready the callback function provided as second arg to get the input data */
UInt32 numOutputDataPackets = 1;
OSStatus status = AudioConverterFillComplexBuffer (
OSStatus status = AudioConverterFillComplexBuffer (
s->audioConverter, // the instance of the converter
encoderCallback, // callback to call when conversion is done
s, // user data to pass to the callback
......@@ -284,7 +284,7 @@ static void enc_process ( MSFilter *f ) {
if ( status != noErr ) {
ms_message ( "AAC-ELD unable to encode, exit status : %ld",status );
ms_message ( "AAC-ELD unable to encode, exit status : %ld", (long)status );
ms_filter_unlock(f);
return;
}
......
......@@ -48,8 +48,6 @@ static const char * audio_unit_format_error (OSStatus error) {
case kAudioUnitErr_NoConnection: return "kAudioUnitErr_NoConnection";
case kAudioUnitErr_FailedInitialization: return "kAudioUnitErr_FailedInitialization";
case kAudioUnitErr_TooManyFramesToProcess: return "kAudioUnitErr_TooManyFramesToProcess";
case kAudioUnitErr_IllegalInstrument: return "kAudioUnitErr_IllegalInstrument";
case kAudioUnitErr_InstrumentTypeNotFound: return "kAudioUnitErr_InstrumentTypeNotFound";
case kAudioUnitErr_InvalidFile: return "kAudioUnitErr_InvalidFile";
case kAudioUnitErr_UnknownFileType: return "kAudioUnitErr_UnknownFileType";
case kAudioUnitErr_FileNotSpecified: return "kAudioUnitErr_FileNotSpecified";
......@@ -63,7 +61,7 @@ static const char * audio_unit_format_error (OSStatus error) {
case kAudioUnitErr_Initialized: return "kAudioUnitErr_Initialized";
case kAudioUnitErr_InvalidOfflineRender: return "kAudioUnitErr_InvalidOfflineRender";
case kAudioUnitErr_Unauthorized: return "kAudioUnitErr_Unauthorized";
default: return "unkown error";
default: return "unknown error";
}
}
......@@ -98,10 +96,10 @@ static const char *audio_session_format_error(OSStatus error)
}
#define check_au_session_result(au,method) \
if (au!=0) ms_error("AudioSession error for %s: ret=%s (%li) (%s:%d)",method, audio_session_format_error(au), au, __FILE__, __LINE__ )
if (au!=0) ms_error("AudioSession error for %s: ret=%s (%li) (%s:%d)",method, audio_session_format_error(au), (long)au, __FILE__, __LINE__ )
#define check_au_unit_result(au,method) \
if (au!=0) ms_error("AudioUnit error for %s: ret=%s (%li) (%s:%d)",method, audio_unit_format_error(au), au, __FILE__, __LINE__ )
if (au!=0) ms_error("AudioUnit error for %s: ret=%s (%li) (%s:%d)",method, audio_unit_format_error(au), (long)au, __FILE__, __LINE__ )
#define check_session_call(call) do { OSStatus res = (call); check_au_session_result(res, #call); } while(0)
......@@ -393,9 +391,9 @@ static OSStatus au_write_cb (
ms_bufferizer_read(d->bufferizer, ioData->mBuffers[0].mData, inNumberFrames*d->base.card->bits/8);
/*basic algo, can be enhanced with a more advanced bufferizer computing average value*/
if (ms_bufferizer_get_avail(d->bufferizer) > card->rate* (card->nchannels * card->bits / 8)/5 ) {
ms_warning("we are at least 200ms late, bufferizer sise is %i bytes in framezize is %lu bytes"
,ms_bufferizer_get_avail(d->bufferizer)
,inNumberFrames*d->base.card->bits/8);
ms_warning("we are at least 200ms late, bufferizer sise is %li bytes in framezize is %li bytes"
,(long)ms_bufferizer_get_avail(d->bufferizer)
,(long)inNumberFrames*d->base.card->bits/8);
ms_bufferizer_flush(d->bufferizer);
}
ms_mutex_unlock(&d->mutex);
......@@ -487,7 +485,7 @@ static bool_t start_audio_unit (au_filter_base_t* d,uint64_t time) {
, &quality
, &qualitySize));
ms_message("I/O unit latency [%f], quality [%li]",delay,quality);
ms_message("I/O unit latency [%f], quality [%u]",delay,(unsigned)quality);
Float32 hwoutputlatency;
UInt32 hwoutputlatencySize=sizeof(hwoutputlatency);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment