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,
|
RunConvert(PcmConvert &convert, size_t in_frame_size,
|
||||||
FileDescriptor in_fd, FileDescriptor out_fd)
|
FileDescriptor in_fd, FileDescriptor out_fd)
|
||||||
{
|
{
|
||||||
|
in_fd.SetBinaryMode();
|
||||||
|
out_fd.SetBinaryMode();
|
||||||
|
|
||||||
StaticFifoBuffer<std::byte, 4096> buffer;
|
StaticFifoBuffer<std::byte, 4096> buffer;
|
||||||
|
|
||||||
while (true) {
|
while (true) {
|
||||||
|
@ -164,6 +164,8 @@ static int
|
|||||||
dump_input_stream(InputStream &is, FileDescriptor out,
|
dump_input_stream(InputStream &is, FileDescriptor out,
|
||||||
offset_type seek, size_t chunk_size)
|
offset_type seek, size_t chunk_size)
|
||||||
{
|
{
|
||||||
|
out.SetBinaryMode();
|
||||||
|
|
||||||
std::unique_lock<Mutex> lock(is.mutex);
|
std::unique_lock<Mutex> lock(is.mutex);
|
||||||
|
|
||||||
if (seek > 0)
|
if (seek > 0)
|
||||||
|
@ -117,6 +117,8 @@ static void
|
|||||||
RunOutput(AudioOutput &ao, AudioFormat audio_format,
|
RunOutput(AudioOutput &ao, AudioFormat audio_format,
|
||||||
FileDescriptor in_fd)
|
FileDescriptor in_fd)
|
||||||
{
|
{
|
||||||
|
in_fd.SetBinaryMode();
|
||||||
|
|
||||||
/* open the audio output */
|
/* open the audio output */
|
||||||
|
|
||||||
ao.Enable();
|
ao.Enable();
|
||||||
|
Loading…
Reference in New Issue
Block a user