Problem viewing > 2 channels with AudioThumbnail

When I try to view WAV files with more than two channels, AudioThumbnail only shows the first two. The number of channels in the source is reported currently and affects the layout, but no data is shown for channel numbers < 1. I am reading the missing channels just fine using an AudioFormatReader elsewhere in my app. 

To reproduce: run demo app built from current tip, select "File Playback" demo, view a WAV file with >2 channels. Here is a small 4 channel one: [1.4MB]


See my post #20 in this thread:


Ah, OK. Looks like AudioThumbnail::LevelDataSource is still only set up to do 2 channels at most. 


I hade the same problem so I made a patch to support multi-channel audio. I have only tested the patch on Windows at the moment but I think it should work on all platforms.

Feel free to take a look at it.

Thanks. I had been meaning to refactor the AudioFormatReader to handle multiple channels - I've done that now. Haven't had chance to also look at the thumbnail, but you might want to update your code to use the new readMaxLevels method (which is different to what you suggested) and I'll return to do the thumbnail part when I get a moment.

Saw that you fixed the thumbnail component as well. Thanks!