On iOS, it is easy to get the number of bytes in a loaded WAV file:
UInt64 dataSize = 0; // dataSize UInt32 ps = sizeof(UInt64); // property size if( AudioFileGetProperty(fileId, kAudioFilePropertyAudioDataByteCount, &ps, &dataSize) ) puts( "error retriving data chunk size" ); return dataSize ;
But in the documentation , I seem to be unable to find any information on how to determine the sampling rate of the PCM wave file.
source share