说明
查询I2S输入的采样率
用法
AudioInI2S.sampleRate();
返回
I2S 接口的当前采样率,以 Hz 为单位。
示例
// setup the I2S audio input for 44.1 kHz with 32-bits per sample
if (!AudioInI2S.begin(44100, 32)) {
Serial.println("Failed to initialize I2S input!");
while (1); // do nothing
}
Serial.print(“sample rate = “);
Serial.println(AudioInI2S.sampleRate()); // prints out the sample rate used in begin(...)
Serial.print(“bit per sample = “);
Serial.println(AudioInI2S.bitsPerSample()); // prints out the bits per sample rate used in begin(...)
Serial.print(“channels = “);
Serial.println(AudioInI2S.channels()); // prints out 2, I2S always has 2 channels
相关用法
- Arduino ArduinoSound - AudioInI2S.bitsPerSample()用法及代码示例
- Arduino ArduinoSound - AudioInI2S.end()用法及代码示例
- Arduino ArduinoSound - AudioInI2S.channels()用法及代码示例
- Arduino ArduinoSound - AudioOutI2S.stop()用法及代码示例
- Arduino ArduinoSound - AudioOutI2S.loop()用法及代码示例
- Arduino ArduinoSound - AudioOutI2S.play()用法及代码示例
- Arduino ArduinoSound - AudioOutI2S.canPlay()用法及代码示例
- Arduino ArduinoSound - AudioOutI2S.volume()用法及代码示例
- Arduino ArduinoSound - AudioOutI2S.resume()用法及代码示例
- Arduino ArduinoSound - AudioOutI2S.isPaused()用法及代码示例
- Arduino ArduinoSound - AudioOutI2S.isPlaying()用法及代码示例
- Arduino ArduinoSound - FFTAnalyzer.input()用法及代码示例
- Arduino ArduinoSound - SDWaveFile.frames()用法及代码示例
- Arduino ArduinoSound - SDWaveFile.duration()用法及代码示例
- Arduino ArduinoSound - FFTAnalyzer.read()用法及代码示例
- Arduino ArduinoSound - SDWaveFile用法及代码示例
- Arduino ArduinoSound - SDWaveFile.sampleRate()用法及代码示例
- Arduino ArduinoSound - amplitudeAnalyzer.read()用法及代码示例
- Arduino ArduinoSound - SDWaveFile.channels()用法及代码示例
- Arduino ArduinoSound - SDWaveFile.bitsPerSample()用法及代码示例
- Arduino ArduinoSound - SDWaveFile.bool()用法及代码示例
- Arduino ArduinoSound - amplitudeAnalyzer.available()用法及代码示例
- Arduino ArduinoSound - FFTAnalyzer.available()用法及代码示例
- Arduino ArduinoSound - FFTAnalyzer用法及代码示例
- Arduino ArduinoSound - SDWaveFile.currentTime()用法及代码示例
注:本文由纯净天空筛选整理自arduino.cc大神的英文原创作品 ArduinoSound - AudioInI2S.sampleRate()。非经特殊声明,原始代码版权归原作者所有,本译文未经允许或授权,请勿转载或复制。