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
54d51842
Commit
54d51842
authored
8 years ago
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
output/winmm: use std::array
parent
0c5b986f
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
3 deletions
+5
-3
WinmmOutputPlugin.cxx
src/output/plugins/WinmmOutputPlugin.cxx
+5
-3
No files found.
src/output/plugins/WinmmOutputPlugin.cxx
View file @
54d51842
...
...
@@ -28,6 +28,8 @@
#include "util/Macros.hxx"
#include "util/StringCompare.hxx"
#include <array>
#include <stdlib.h>
#include <string.h>
...
...
@@ -51,7 +53,7 @@ class WinmmOutput {
*/
HANDLE
event
;
WinmmBuffer
buffers
[
8
]
;
std
::
array
<
WinmmBuffer
,
8
>
buffers
;
unsigned
next_buffer
;
public
:
...
...
@@ -275,7 +277,7 @@ WinmmOutput::Play(const void *chunk, size_t size, Error &)
}
/* mark our buffer as "used" */
next_buffer
=
(
next_buffer
+
1
)
%
ARRAY_SIZE
(
buffers
);
next_buffer
=
(
next_buffer
+
1
)
%
buffers
.
size
(
);
return
size
;
}
...
...
@@ -283,7 +285,7 @@ WinmmOutput::Play(const void *chunk, size_t size, Error &)
void
WinmmOutput
::
DrainAllBuffers
()
{
for
(
unsigned
i
=
next_buffer
;
i
<
ARRAY_SIZE
(
buffers
);
++
i
)
for
(
unsigned
i
=
next_buffer
;
i
<
buffers
.
size
(
);
++
i
)
DrainBuffer
(
buffers
[
i
]);
for
(
unsigned
i
=
0
;
i
<
next_buffer
;
++
i
)
...
...
This diff is collapsed.
Click to expand it.
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