Cannot play WAV files
trying to use wav files and i can't get them to work no matter what using phiola. Plays in any other media player just fine, so I'm unsure what could be going on. I am running these through the CLI.
The first file I tried is 353kbps, int16, 22050Hz mono, no dice
then the second file i tried, something more modern, 2822kbps int32 44100Hz stereo, also wouldn't work.
Both files output the same error:
01:27:11.720 #25968 ERROR wasapi: *1: open(): unsupported format
Any help would be massively appreciated!
Hi! Looks like phiola can't get the audio format that is set by default in your Windows audio settings. Let's find out why is that. Here are a few options:
- Execute
phiola -D ....wav | findstr wasapi:This will print several lines to you terminal. Please paste here the linewasapi: *1: opening device .... - Execute
phiola -D ....wav -exclusive | findstr wasapi:It's the same but now trying to open the audio device exclusively. - What's the default format for your audio device? Try to set another format. (See https://integraudio.com/default-audio-format-windows-10/)
- Lines + Error
08:40:52.738 #3272 DEBUG wasapi: *1: opening device #0, int16/22050/1, flags:80
08:40:53.576 #3272 DEBUG wasapi: *1: opening device #0, float32/48000/8, flags:80
08:40:54.112 #3272 ERROR wasapi: *1: open(): unsupported format
-
No change running
-exclusive, same output as above -
My Default Format is "8 channel, 16 bit, 480000 Hz", which I believe is unique to my corsair headset. Setting it to any of the other available formats in 2 channel mode makes it work just fine.
Something I will note: Now, with the channel change, I can play all of the wav files, however, any sounds with a different Hertz from my Default Format have a considerable delay compared to the other formats. a little over half a second!
in 2 channel mode makes it work just fine.
Interesting! I think your audio device doesn't support float32/48000/8 that phiola is trying to use but supports int16/48000/8. This is surprising to me because WASAPI should convert float32->int16 internally, and phiola relies on this behaviour. We can test this theory:
- Change your default format back to
int16/48000/8as it was before. - Convert your audio file:
phiola convert ....wav -o test.wav -af int16 -chan 8 -ra 48000
-
Now try to play the new file:
phiola -D test.wav | findstr wasapi: -
It should print
opening device #0, int16/48000/8and then play audio just fine.