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
c36a6b0a
Commit
c36a6b0a
authored
Dec 17, 2008
by
Emanuele Giaquinta
Committed by
Max Kellermann
Dec 17, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Factor computation.
parent
a4f0c7b4
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
4 deletions
+6
-4
osx_plugin.c
src/output/osx_plugin.c
+6
-4
No files found.
src/output/osx_plugin.c
View file @
c36a6b0a
...
...
@@ -143,6 +143,7 @@ osx_render(void *vdata,
AudioBuffer
*
buffer
=
&
bufferList
->
mBuffers
[
0
];
size_t
bufferSize
=
buffer
->
mDataByteSize
;
size_t
bytesToCopy
;
size_t
bytes
;
int
curpos
=
0
;
/*DEBUG("osx_render: enter : %i\n", (int)bufferList->mNumberBuffers);
...
...
@@ -185,8 +186,8 @@ osx_render(void *vdata,
bufferSize
=
bytesToCopy
;
od
->
len
-=
bytesToCopy
;
if
(
od
->
pos
+
bytesToCopy
>
od
->
bufferSize
)
{
size_t
bytes
=
od
->
bufferSize
-
od
->
pos
;
bytes
=
od
->
bufferSize
-
od
->
pos
;
if
(
bytesToCopy
>
bytes
)
{
memcpy
((
unsigned
char
*
)
buffer
->
mData
+
curpos
,
od
->
buffer
+
od
->
pos
,
bytes
);
od
->
pos
=
0
;
curpos
+=
bytes
;
...
...
@@ -299,6 +300,7 @@ osx_play(void *data, const char *playChunk, size_t size)
{
OsxData
*
od
=
data
;
size_t
bytesToCopy
;
size_t
bytes
;
size_t
curpos
;
/* DEBUG("osx_play: enter\n"); */
...
...
@@ -333,8 +335,8 @@ osx_play(void *data, const char *playChunk, size_t size)
size
-=
bytesToCopy
;
od
->
len
+=
bytesToCopy
;
if
(
curpos
+
bytesToCopy
>
od
->
bufferSize
)
{
size_t
bytes
=
od
->
bufferSize
-
curpos
;
bytes
=
od
->
bufferSize
-
curpos
;
if
(
bytesToCopy
>
bytes
)
{
memcpy
(
od
->
buffer
+
curpos
,
playChunk
,
bytes
);
curpos
=
0
;
playChunk
+=
bytes
;
...
...
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