Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
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
Commits
152693ff
Commit
152693ff
authored
Jun 15, 2012
by
Michael Feurstein
Committed by
Jean-Baptiste Kempf
Jun 20, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
qtsound: fix broken qtsound module
Signed-off-by:
Jean-Baptiste Kempf
<
jb@videolan.org
>
parent
afc252c4
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
27 deletions
+7
-27
modules/access/qtsound.m
modules/access/qtsound.m
+7
-27
No files found.
modules/access/qtsound.m
View file @
152693ff
...
@@ -165,12 +165,8 @@ vlc_module_end ()
...
@@ -165,12 +165,8 @@ vlc_module_end ()
b2Ptr
=
(
const
float
*
)
tempAudioBufferList
->
mBuffers
[
1
].
mData
;
b2Ptr
=
(
const
float
*
)
tempAudioBufferList
->
mBuffers
[
1
].
mData
;
i
<
numberOfSamples
;
i
++
)
i
<
numberOfSamples
;
i
++
)
{
{
*
uPtr
=
*
b1Ptr
;
*
uPtr
++
=
*
b1Ptr
++
;
uPtr
++
;
*
uPtr
++
=
*
b2Ptr
++
;
b1Ptr
++
;
*
uPtr
=
*
b2Ptr
;
uPtr
++
;
b2Ptr
++
;
}
}
if
(
currentAudioBuffer
==
nil
)
if
(
currentAudioBuffer
==
nil
)
...
@@ -449,15 +445,6 @@ static int Open( vlc_object_t *p_this )
...
@@ -449,15 +445,6 @@ static int Open( vlc_object_t *p_this )
* before downmixing, the buffer is derived.
* before downmixing, the buffer is derived.
*/
*/
audiofmt
.
audio
.
i_original_channels
=
AOUT_CHAN_RIGHT
|
AOUT_CHAN_LEFT
;
audiofmt
.
audio
.
i_original_channels
=
AOUT_CHAN_RIGHT
|
AOUT_CHAN_LEFT
;
/*
* i_bytes_per_frame Optional - for A/52, SPDIF and DTS types:
* Bytes used by one compressed frame, depends on bitrate.
*/
audiofmt
.
audio
.
i_bytes_per_frame
=
4
;
/*
* Number of sampleframes contained in one compressed frame.
*/
audiofmt
.
audio
.
i_frame_length
=
1
;
/*
/*
* Please note that it may be completely arbitrary - buffers are not
* Please note that it may be completely arbitrary - buffers are not
* obliged to contain a integral number of so-called "frames". It's
* obliged to contain a integral number of so-called "frames". It's
...
@@ -466,9 +453,9 @@ static int Open( vlc_object_t *p_this )
...
@@ -466,9 +453,9 @@ static int Open( vlc_object_t *p_this )
*/
*/
audiofmt
.
audio
.
i_bitspersample
=
32
;
audiofmt
.
audio
.
i_bitspersample
=
32
;
audiofmt
.
audio
.
i_channels
=
2
;
audiofmt
.
audio
.
i_channels
=
2
;
audiofmt
.
audio
.
i_blockalign
=
audiofmt
.
audio
.
i_channels
*
audiofmt
.
audio
.
i_bitspersample
/
16
;
audiofmt
.
audio
.
i_blockalign
=
audiofmt
.
audio
.
i_channels
*
(
audiofmt
.
audio
.
i_bitspersample
/
8
)
;
audiofmt
.
i_bitrate
=
audiofmt
.
audio
.
i_channels
*
audiofmt
.
audio
.
i_rate
*
audiofmt
.
audio
.
i_bitspersample
;
audiofmt
.
i_bitrate
=
audiofmt
.
audio
.
i_channels
*
audiofmt
.
audio
.
i_rate
*
audiofmt
.
audio
.
i_bitspersample
;
p_sys
->
i_audio_max_buffer_size
=
4096
;
p_sys
->
i_audio_max_buffer_size
=
audiofmt
.
i_bitrate
;
p_sys
->
session
=
[[
QTCaptureSession
alloc
]
init
];
p_sys
->
session
=
[[
QTCaptureSession
alloc
]
init
];
...
@@ -554,10 +541,10 @@ static int Demux( demux_t *p_demux )
...
@@ -554,10 +541,10 @@ static int Demux( demux_t *p_demux )
{
{
if
(
[
p_sys
->
audiooutput
checkCurrentAudioBuffer
]
)
if
(
[
p_sys
->
audiooutput
checkCurrentAudioBuffer
]
)
{
{
p_blocka
->
i_
pts
=
[
p_sys
->
audiooutput
getCurrentPts
];
p_blocka
->
i_
buffer
=
p_blocka
->
i_size
=
[
p_sys
->
audiooutput
getCurrentTotalDataSize
];
p_blocka
->
p_buffer
=
[
p_sys
->
audiooutput
getCurrentAudioBufferData
];
p_blocka
->
p_buffer
=
p_blocka
->
p_start
=
[
p_sys
->
audiooutput
getCurrentAudioBufferData
];
p_blocka
->
i_nb_samples
=
[
p_sys
->
audiooutput
getNumberOfSamples
];
p_blocka
->
i_nb_samples
=
[
p_sys
->
audiooutput
getNumberOfSamples
];
p_blocka
->
i_
buffer
=
[
p_sys
->
audiooutput
getCurrentTotalDataSize
];
p_blocka
->
i_
pts
=
[
p_sys
->
audiooutput
getCurrentPts
];
}
}
}
}
...
@@ -577,13 +564,6 @@ static int Demux( demux_t *p_demux )
...
@@ -577,13 +564,6 @@ static int Demux( demux_t *p_demux )
@synchronized
(
p_sys
->
audiooutput
)
@synchronized
(
p_sys
->
audiooutput
)
{
{
/*
* Free Memory
*
* Wait before freeing memory, so we don't get no crackling sound
* crackling sound artefacts start at 100 ms and below
*/
msleep
(
200
);
[
p_sys
->
audiooutput
freeAudioMem
];
[
p_sys
->
audiooutput
freeAudioMem
];
}
}
...
...
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