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
4d9af9a8
Commit
4d9af9a8
authored
Mar 08, 2021
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
test/run_{input,output,convert}: switch file descriptors to binary mode
Fixes those programs on Windows.
parent
d61341c0
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
0 deletions
+7
-0
run_convert.cxx
test/run_convert.cxx
+3
-0
run_input.cxx
test/run_input.cxx
+2
-0
run_output.cxx
test/run_output.cxx
+2
-0
No files found.
test/run_convert.cxx
View file @
4d9af9a8
...
...
@@ -106,6 +106,9 @@ static void
RunConvert
(
PcmConvert
&
convert
,
size_t
in_frame_size
,
FileDescriptor
in_fd
,
FileDescriptor
out_fd
)
{
in_fd
.
SetBinaryMode
();
out_fd
.
SetBinaryMode
();
StaticFifoBuffer
<
std
::
byte
,
4096
>
buffer
;
while
(
true
)
{
...
...
test/run_input.cxx
View file @
4d9af9a8
...
...
@@ -164,6 +164,8 @@ static int
dump_input_stream
(
InputStream
&
is
,
FileDescriptor
out
,
offset_type
seek
,
size_t
chunk_size
)
{
out
.
SetBinaryMode
();
std
::
unique_lock
<
Mutex
>
lock
(
is
.
mutex
);
if
(
seek
>
0
)
...
...
test/run_output.cxx
View file @
4d9af9a8
...
...
@@ -117,6 +117,8 @@ static void
RunOutput
(
AudioOutput
&
ao
,
AudioFormat
audio_format
,
FileDescriptor
in_fd
)
{
in_fd
.
SetBinaryMode
();
/* open the audio output */
ao
.
Enable
();
...
...
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