Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
mediastreamer2
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
3
Issues
3
List
Board
Labels
Milestones
Merge Requests
7
Merge Requests
7
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
External Wiki
External Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
BC
public
mediastreamer2
Commits
09788a6f
Commit
09788a6f
authored
Apr 22, 2016
by
Gautier Pelloux-Prayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
audiofilters: fix compilation warnings on iOS
parent
0a69ecb8
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
15 deletions
+13
-15
aac-eld.c
src/audiofilters/aac-eld.c
+6
-6
msiounit.m
src/audiofilters/msiounit.m
+7
-9
No files found.
src/audiofilters/aac-eld.c
View file @
09788a6f
...
...
@@ -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
;
}
...
...
src/audiofilters/msiounit.m
View file @
09788a6f
...
...
@@ -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
"unk
n
own 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
)
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment