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: F746_GUI F746_SAI_IO FrequencyResponseDrawer SD_PlayerSkeleton UIT_FFT_Real
Diff: MySpectrogram/SpectrogramMain.hpp
- Revision:
- 11:5eb943ee9b91
- Parent:
- 9:81709a7ee279
--- a/MySpectrogram/SpectrogramMain.hpp Sun Jan 29 09:27:04 2017 +0000
+++ b/MySpectrogram/SpectrogramMain.hpp Fri Mar 17 01:45:36 2017 +0000
@@ -2,7 +2,7 @@
// リアルタイムスペクトログラム
// 入力: MEMS マイク
//
-// 2017/01/23, Copyright (c) 2017 MIKAMI, Naoki
+// 2017/03/17, Copyright (c) 2017 MIKAMI, Naoki
//------------------------------------------------
#include "SAI_InOut.hpp"
@@ -15,7 +15,7 @@
void Spectrogram()
{
- const int FS = I2S_AUDIOFREQ_16K; // 標本化周波数: 16 kHz
+ const int FS = AUDIO_FREQUENCY_16K; // 標本化周波数: 16 kHz
const int N_FFT = 512; // FFT の点数
const float FRAME = (N_FFT/(float)FS)*1000.0f; // 1 フレームに対応する時間(単位:ms)
@@ -34,8 +34,8 @@
SaiIO mySai(SaiIO::INPUT, N_FFT+1, FS,
INPUT_DEVICE_DIGITAL_MICROPHONE_2);
- LCD_DISCO_F746NG *lcd = GuiBase::GetLcdPtr(); // LCD 表示器のオブジェクト
- lcd->Clear(GuiBase::ENUM_BACK);
+ LCD_DISCO_F746NG &lcd = GuiBase::GetLcd(); // LCD 表示器のオブジェクトの参照
+ lcd.Clear(GuiBase::ENUM_BACK);
Label myLabel1(240, 2, "Real-time spectrogram", Label::CENTER, Font16);
// ButtonGroup の設定
@@ -106,4 +106,3 @@
reset.DoIfTouched(); // リセットボタンがタッチされればメニューに戻る
}
}
-