Sound error and codec messages


#1

I am seeing a range of error and warning messages about audio codecs and formats. But the sound “appears” to be working… just reporting here in case HiFi devs find this useful…

[2014-08-17T16:30:21] The desired audio format is not supported by this device
[2014-08-17T16:30:21] The format to be used for audio input is QAudioFormat(48000Hz, 16bit, channelCount=1, sampleType=SignedInt, byteOrder=LittleEndian, codec=“audio/pcm”)

Full trace…

[2014-08-17T16:30:21] input device: “Microphone (2- Logitech Mic (Ul”
[2014-08-17T16:30:21] Found a data-server access token for https://data.highfidelity.io
[2014-08-17T16:30:21] Logging activity “launch”
[2014-08-17T16:30:21] “Microphone (2- Logitech Mic (Ul” “Microphone (2- Logitech Mic (Ul”
[2014-08-17T16:30:21] “Microphone (Realtek High Defini” “Microphone (2- Logitech Mic (Ul”
[2014-08-17T16:30:21] DEBUG [ “Microphone (2- Logitech Mic (Ul” ] [ “Microphone(2- Logitech Mic (Ul” ]
[2014-08-17T16:30:21] “Microphone (2- Logitech Mic (Ul” “Microphone (2- Logitech Mic (Ul”
[2014-08-17T16:30:21] “Microphone (Realtek High Defini” “Microphone (2- Logitech Mic (Ul”
[2014-08-17T16:30:21] The default audio input device is “Microphone (2- Logitech Mic (Ul”
[2014-08-17T16:30:21] The audio input device "Microphone (2- Logitech Mic (Ul"is available.
[2014-08-17T16:30:21] The desired format for audio I/O is QAudioFormat(24000Hz,16bit, channelCount=1, sampleType=SignedInt, byteOrder=LittleEndian, codec=“audio/pcm”)
[2014-08-17T16:30:21] The desired audio format is not supported by this device
[2014-08-17T16:30:21] The format to be used for audio input is QAudioFormat(48000Hz, 16bit, channelCount=1, sampleType=SignedInt, byteOrder=LittleEndian, codec=“audio/pcm”)
[2014-08-17T16:30:21] Created Display Window.
[2014-08-17T16:30:21] output device: “Speakers (Realtek High Definiti”
[2014-08-17T16:30:21] Status: Using GLEW 1.10.0
[2014-08-17T16:30:21] Initialized Display.
[2014-08-17T16:30:21] “Speakers (Realtek High Definiti” “Speakers (Realtek High Definiti”
[2014-08-17T16:30:21] “Realtek Digital Output (Realtek” “Speakers (Realtek High Definiti”
[2014-08-17T16:30:21] DEBUG [ “Speakers (Realtek High Definiti” ] [ “Speakers (Realtek High Definiti” ]
[2014-08-17T16:30:21] “Speakers (Realtek High Definiti” “Speakers (Realtek High Definiti”
[2014-08-17T16:30:21] “Realtek Digital Output (Realtek” “Speakers (Realtek High Definiti”
[2014-08-17T16:30:21] The default audio output device is “Speakers (Realtek High Definiti”
[2014-08-17T16:30:21] The audio output device “Speakers (Realtek High Definiti” is available.
[2014-08-17T16:30:21] The desired format for audio I/O is QAudioFormat(24000Hz,16bit, channelCount=2, sampleType=SignedInt, byteOrder=LittleEndian, codec=“audio/pcm”)
[2014-08-17T16:30:21] The desired audio format is not supported by this device
[2014-08-17T16:30:21] The format to be used for audio output is QAudioFormat(48000Hz, 16bit, channelCount=2, sampleType=SignedInt, byteOrder=LittleEndian, codec=“audio/pcm”)


#2

Seems high Fidelity is trying to use 24Khz 16bit, and your driver/card dont support that format.
And thats creating the error.

I dont understand why High Fidelity want to use a strang sample rate like 24Khz. its for me not a common one. 22Khz or 44Khz ok. but 24Khz. need to say not watch or seen the errors here.


#3

The log logs in fact that interface has got a desired format of 24000Hz

Can’t get it since it is not available

and then chooses a second best rate.

I think it is aimed at getting the best sound possible, but the code sure could use some love. (less logging, some meaningful notice if the input or output can’t be initialized (and don’t try to initialize when the sample rate is lower than 24000hr, interface will crash if trying to initialize an audio device at a sample rate which is not availiable))


#4

Did anyone solve this problem? It’s what has prevented me from using HF on Windows since the beginning (8 months ago).


#5

Actually the really strange thing about all this is…

I see Interface complain it can’t set 24K samples/sec then fall back to 48K. That’s all well and good, but it lies.

The device I’m using absolutely supports all of the following rates for input and output.

11025, 22050, 44100, 88200, 12000, 24000, 48000, 96000 ( as well as 5512 and 6000).

11025, 22050, 44100 are the old standard rates coming from CD Audio having a standard rate of 44100 - when PC sound cards first came on market it was easiest to stick to that and its fractional rates as the analog to digital / digital to analog chips and clock drivers available were sourced from CD audio chip sets. The lower rates were attempts to give data rates the very slow buses and CPUs of the day when those were new could handle. Few PCs could play back at 44.1K let alone capture at when these things were defined. :smile:

12000, 24000, 48000 and on is the newer standard rates that came to be from USB audio devices and is logical as USB has a clock rate that makes using those rates much easier than the previous rates. It’s rare to find any PC hardware that doesn’t support those rates fully made in last few years - while the same can’t be said for the older rates. In many cases the actual hardware only works at one clock rate (its highest) and uses decimation to get the lower rates for input and up-sampling for output. In fact - many hardware devices only support the 12/24/48K rates now and use re-sampling to deal with 11025/22050/44100 (this is why some devices sound so much better than others when playing content its hardware does not natively support data rates for - re-sampling is a CPU costly operation and some drivers use low quality, but fast, re-sample code).

Using my old favorite cross platform audio library; portaudio, I can open the device for any of those rates - even using one rate for playback and another for recording. Not going to make a big deal about it, but, at least on Windows, the audio initialization code is seriously not getting it right. It’s also, on my, admittedly complex system as I have 8 sound devices, totally ignoring the picked audio device and always using the windows default in/out devices - regardless of running Interface’s js to select audio devices.

There’s no question the device(s) I have support all those rates regardless of whatever code QT is using saying they do not. Considering one of my audio devices is based on hardware I designed and wrote the drivers for, I’m reasonably sure what rates it does/does not support and of its proper working with mono versus stereo streams.


#6

Yes, what this log is basically saying is that the optimal format for your device is not supported and we had to adjust the audio format for it to work.
This should not pose any issues, it is just the log being very verbose about it.

@OmegaHeron it is not only a matter of sample rate but also of channel count. What the log complains about i that the preferred format for that device is not supported by hifi. That doesn’t mean we can’t find something that fits, which is what were are doing right after that message appears. But you are right that this code is also dependent on what Qt does and as we are porting to GearVR, we might soon realised that this part of Qt is busted on android as it is pretty recent. In that case we’ll then have to try and get away from Qt regarding audio.


#7

@giulio do you have a log/stack trace for us?


#8

Here:

[DEBUG] [01/18 15:54:57] [VERSION] Build sequence:  1776
[WARNING] [01/18 15:54:57] Couldn’t open bookmarks file for reading
[DEBUG] [01/18 15:54:57] First call to Menu::getInstance() - initing menu.
[DEBUG] [01/18 15:54:59] AccountManager URL for authenticated requests has been changed to https://data.highfidelity.io
[DEBUG] [01/18 15:54:59] input  device: “Microphone (Realtek High Defini”
[DEBUG] [01/18 15:54:59] Logging activity “launch”
[DEBUG] [01/18 15:54:59] No valid access token present. Bailing on authenticated invoked request.
[DEBUG] [01/18 15:54:59] DEBUG [ “Microphone (Realtek High Defini” ] [ “Microphone (Realtek High Defini” ]
[DEBUG] [01/18 15:54:59] The default audio input device is “Microphone (Realtek High Defini”
[DEBUG] [01/18 15:54:59] The audio input device  “Microphone (Realtek High Defini” is available.
[DEBUG] [01/18 15:54:59] The desired format for audio I/O is QAudioFormat(24000Hz, 16bit, channelCount=1, sampleType=SignedInt, byteOrder=LittleEndian, codec=“audio/pcm”)
[DEBUG] [01/18 15:54:59] The desired audio format is not supported by this device
[DEBUG] [01/18 15:54:59] The format to be used for audio input is QAudioFormat(48000Hz, 16bit, channelCount=1, sampleType=SignedInt, byteOrder=LittleEndian, codec=“audio/pcm”)
[DEBUG] [01/18 15:54:59] output  device: “Speakers (Realtek High Definiti”