Addresses issue #182 - Notification sound playback problems#183
Conversation
…oblems Fix 8bit playback Enable 24bit playback Enable 32bit playback Upmix mono to stereo Set the sample format appropriately based upon the bits per channel in the format chunk instead of defaulting to 16 bits
eb296fa to
9210938
Compare
|
This is an interesting one because while I've heard of it, what platforms did it affect? There was never any issue with this on MacOS, for whatever reason. Just a few days ago I set my MSG notification to play a .wav file (that was the only one I could find on my system) for AC/DC "You Shook Me All Night Long". I got a 200w sound system on the Mac mini and forgot I had the volume turned up kinda loud. Had a MSG come in and my wife goes, "what is wrong with your computer? It suddenly came on and sounds like Brian Johnson and Angus Young got into your office and they're shaking the whole house!" But it was playing normally, no issues with the playback. |
|
I believe it affects all platforms, the issue is the wav file characteristics. I uploaded a zip of test wav files to #182 , try the 8bit mono file and see how it plays on your system. During the transition to QT6, a change was made to the wav file player code that assumes 16bit instead of determining the actual bit depth of the file. When you play an 8bit file assuming it's 16bit, it does the chipmunk thing. Also, mono files were only playing on the left speaker. |
|
Those test files also play fine on the Mac thru JS8Call with no problem detected. Here is a demo of it in operation with the file I was using previously. So I have to believe this is platform-dependent somehow. |
|
I can verify it here on Windows 11, but not with MacOS 26. Since MacOS is designed from the ground up for professional musicians and content creators, there's likely some conversion magic going on in MacOS CoreAudio that prevents an 8-bit audio file from getting played incorrectly. As far as that goes, it's a little confusing as to why the .wav file format was selected for JS8Call. That's a Microsoft format. IMO .mp3 or the FFmpeg .m4a would've been better. I built this code and it doesn't make any difference on Mac, but it does fix it on Windows 11. So I'd say if this works on linux too, let's run with it. |
|
Merged. Thanks Rob! |
Fix 8bit playback - set the sample format appropriately based upon the bits per channel in the format chunk instead of defaulting to 16 bits
Enable 24bit playback
Upmix mono to stereo