Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mpd
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Иван Мажукин
mpd
Commits
931c3a1d
Commit
931c3a1d
authored
Jun 08, 2019
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
output/osx: convert `int` to `size_t`
parent
a7b30fcb
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
OSXOutputPlugin.cxx
src/output/plugins/OSXOutputPlugin.cxx
+4
-4
No files found.
src/output/plugins/OSXOutputPlugin.cxx
View file @
931c3a1d
...
...
@@ -389,7 +389,7 @@ osx_output_set_device_format(AudioDeviceID dev_id, const AudioStreamBasicDescrip
throw
FormatRuntimeError
(
"Cannot get number of streams: %d
\n
"
,
err
);
}
int
n_streams
=
property_size
/
sizeof
(
AudioStreamID
);
const
size_t
n_streams
=
property_size
/
sizeof
(
AudioStreamID
);
AudioStreamID
streams
[
n_streams
];
err
=
AudioObjectGetPropertyData
(
dev_id
,
&
aopa
,
0
,
NULL
,
&
property_size
,
streams
);
if
(
err
!=
noErr
)
{
...
...
@@ -400,7 +400,7 @@ osx_output_set_device_format(AudioDeviceID dev_id, const AudioStreamBasicDescrip
int
output_stream
;
AudioStreamBasicDescription
output_format
;
for
(
int
i
=
0
;
i
<
n_streams
;
i
++
)
{
for
(
size_t
i
=
0
;
i
<
n_streams
;
i
++
)
{
UInt32
direction
;
AudioStreamID
stream
=
streams
[
i
];
aopa
.
mSelector
=
kAudioStreamPropertyDirection
;
...
...
@@ -423,14 +423,14 @@ osx_output_set_device_format(AudioDeviceID dev_id, const AudioStreamBasicDescrip
if
(
err
!=
noErr
)
throw
FormatRuntimeError
(
"Unable to get format size s for stream %d. Error = %s"
,
streams
[
i
],
err
);
in
t
format_count
=
property_size
/
sizeof
(
AudioStreamRangedDescription
);
const
size_
t
format_count
=
property_size
/
sizeof
(
AudioStreamRangedDescription
);
AudioStreamRangedDescription
format_list
[
format_count
];
err
=
AudioObjectGetPropertyData
(
stream
,
&
aopa
,
0
,
NULL
,
&
property_size
,
format_list
);
if
(
err
!=
noErr
)
throw
FormatRuntimeError
(
"Unable to get available formats for stream %d. Error = %s"
,
streams
[
i
],
err
);
float
output_score
=
0
;
for
(
in
t
j
=
0
;
j
<
format_count
;
j
++
)
{
for
(
size_
t
j
=
0
;
j
<
format_count
;
j
++
)
{
AudioStreamBasicDescription
format_desc
=
format_list
[
j
].
mFormat
;
std
::
string
format_string
;
...
...
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