Commit 4d9af9a8 authored by Max Kellermann's avatar Max Kellermann

test/run_{input,output,convert}: switch file descriptors to binary mode

Fixes those programs on Windows.
parent d61341c0
......@@ -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) {
......
......@@ -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)
......
......@@ -117,6 +117,8 @@ static void
RunOutput(AudioOutput &ao, AudioFormat audio_format,
FileDescriptor in_fd)
{
in_fd.SetBinaryMode();
/* open the audio output */
ao.Enable();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment