Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc-2-2
Commits
3ce32a80
Commit
3ce32a80
authored
Jan 19, 2013
by
Felix Paul Kühne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
audioqueue: feed the decoder's sample rate to the OS and enforce FL32 instead of S16N
parent
33c292a1
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
9 deletions
+7
-9
modules/audio_output/audioqueue.c
modules/audio_output/audioqueue.c
+7
-9
No files found.
modules/audio_output/audioqueue.c
View file @
3ce32a80
/*****************************************************************************
* audioqueue.c : AudioQueue audio output plugin for vlc
*****************************************************************************
* Copyright (C) 2010-201
2
VLC authors and VideoLAN
* Copyright (C) 2010-201
3
VLC authors and VideoLAN
* $Id$
*
* Authors: Romain Goyet <romain.goyet@likid.org>
...
...
@@ -83,15 +83,14 @@ static int Start(audio_output_t *p_aout, audio_sample_format_t *restrict fmt)
// Setup the audio device.
AudioStreamBasicDescription
deviceFormat
;
deviceFormat
.
mSampleRate
=
44100
;
deviceFormat
.
mSampleRate
=
fmt
->
i_rate
;
deviceFormat
.
mFormatID
=
kAudioFormatLinearPCM
;
deviceFormat
.
mFormatFlags
=
kLinearPCMFormatFlagIsSignedInteger
;
// Signed integer, little endian
deviceFormat
.
mBytesPerPacket
=
4
;
deviceFormat
.
mFormatFlags
=
kAudioFormatFlagsNativeFloatPacked
;
// FL32
deviceFormat
.
mFramesPerPacket
=
1
;
deviceFormat
.
mBytesPerFrame
=
4
;
deviceFormat
.
mChannelsPerFrame
=
2
;
deviceFormat
.
mBitsPerChannel
=
16
;
deviceFormat
.
mReserved
=
0
;
deviceFormat
.
mBitsPerChannel
=
32
;
deviceFormat
.
mBytesPerFrame
=
deviceFormat
.
mBitsPerChannel
*
deviceFormat
.
mChannelsPerFrame
/
8
;
deviceFormat
.
mBytesPerPacket
=
deviceFormat
.
mBytesPerFrame
*
deviceFormat
.
mFramesPerPacket
;
// Create a new output AudioQueue for the device.
status
=
AudioQueueNewOutput
(
&
deviceFormat
,
// Format
...
...
@@ -106,9 +105,8 @@ static int Start(audio_output_t *p_aout, audio_sample_format_t *restrict fmt)
if
(
status
!=
noErr
)
return
VLC_EGENERIC
;
fmt
->
i_format
=
VLC_CODEC_
S16N
;
fmt
->
i_format
=
VLC_CODEC_
FL32
;
fmt
->
i_physical_channels
=
AOUT_CHANS_STEREO
;
fmt
->
i_rate
=
44100
;
aout_FormatPrepare
(
fmt
);
p_aout
->
sys
->
b_stopped
=
false
;
...
...
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