Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: SDFileSystem_Warning_Fixed
Diff: SD_WavReader.cpp
- Revision:
- 16:299cc1052baa
- Parent:
- 11:c33c711a5712
- Child:
- 18:6631cd0fbbcd
--- a/SD_WavReader.cpp Mon Mar 20 14:06:47 2017 +0000
+++ b/SD_WavReader.cpp Wed Mar 22 09:20:13 2017 +0000
@@ -4,7 +4,7 @@
// 以下の型式のファイルのみ扱う
// PCM,16 ビットステレオ,標本化周波数 44.1 kHz
//
-// 2017/03/09, Copyright (c) 2017 MIKAMI, Naoki
+// 2017/03/22, Copyright (c) 2017 MIKAMI, Naoki
//--------------------------------------------------------------
#include "SD_WavReader.hpp"
@@ -54,9 +54,9 @@
// PCM, Stereo, 44.1 kHz, 16 bit であることを確認
WaveFormatEx fmtData;
fread(&fmtData, fmtChunkSize, 1, fp_);
- if ((fmtData.wFormatTag != 1) ||
- (fmtData.nChannels != 2) ||
- (fmtData.nSamplesPerSec != 44100) ||
+ if ((fmtData.wFormatTag != 1) ||
+ (fmtData.nChannels != 2) ||
+ (fmtData.nSamplesPerSec != AUDIO_FREQUENCY_44K) ||
(fmtData.wBitsPerSample != 16)
) return false;