Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-1.1
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-1.1
Commits
0a267fd4
Commit
0a267fd4
authored
Jan 16, 2001
by
Pierre Baillet
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- small tweak in the copy handling, reduce CPU usage.
parent
4743982b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
3 deletions
+6
-3
plugins/sdl/aout_sdl.c
plugins/sdl/aout_sdl.c
+6
-3
No files found.
plugins/sdl/aout_sdl.c
View file @
0a267fd4
...
...
@@ -173,7 +173,7 @@ static int aout_Open( aout_thread_t *p_aout )
p_aout
->
p_sys
->
i_audio_end
=
0
;
p_aout
->
p_sys
->
audio_buf
=
NULL
;
p_aout
->
p_sys
->
audio_buf
=
malloc
(
OVERFLOWLIMIT
)
;
/* Initialize some variables */
p_aout
->
psz_device
=
0
;
...
...
@@ -260,6 +260,11 @@ static int aout_SetFormat( aout_thread_t *p_aout )
*****************************************************************************/
static
long
aout_GetBufInfo
(
aout_thread_t
*
p_aout
,
long
l_buffer_limit
)
{
if
(
l_buffer_limit
>
p_aout
->
p_sys
->
i_audio_end
)
{
/* returning 0 here juste gives awful sound in the speakers :/ */
return
(
l_buffer_limit
);
}
return
(
p_aout
->
p_sys
->
i_audio_end
-
l_buffer_limit
);
}
...
...
@@ -284,7 +289,6 @@ static void SDL_aout_callback(void *userdata, byte_t *stream, int len)
{
memcpy
(
stream
,
p_sys
->
audio_buf
,
len
);
memmove
(
p_sys
->
audio_buf
,
&
(
p_sys
->
audio_buf
[
len
]),
end
-
len
);
p_sys
->
audio_buf
=
realloc
(
p_sys
->
audio_buf
,
end
-
len
);
p_sys
->
i_audio_end
-=
len
;
}
}
...
...
@@ -305,7 +309,6 @@ static void aout_Play( aout_thread_t *p_aout, byte_t *buffer, int i_size )
p_aout
->
p_sys
->
i_audio_end
+=
i_size
;
p_aout
->
p_sys
->
audio_buf
=
audio_buf
;
SDL_UnlockAudio
();
/* go on callbacking */
}
...
...
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