test/run_{input,output,convert}: switch file descriptors to binary mode
Fixes those programs on Windows.
This commit is contained in:
parent
d61341c0e3
commit
4d9af9a81b
|
@ -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();
|
||||
|
|
Loading…
Reference in New Issue