How to konw how many samples on a audio file?


#1

hello there,I want to load every channels and samples from audio file(.wav) into an int[][] by using
"bool AudioFormatReader::read()",but I didn’t find any function to know that
how many channels and samples in a audio file exactly ,so how should I create an int[][] if I don’t know the size of ?
I mean , is there have no functions like “GetSampleSize()” or “GetChannelsSize()” ?
did I miss some thing ?
thank!


#2

The reader has public attributes that give you that information, e.g. lengthInSamples, numChannels etc…


#3

I didn’t notice that, thank you very much!!