C++ ??? ??? ???? ????? ??? ??? ?? ??? ???? ??
Aug 26, 2023 pm 10:33 PM???? ????? ??? ??? ?? ??? ???? ?? C++ ?? ??
??:
??? ??? ?? ???? ???? ?? ??? ?? ? ?????? ???, ?? ?? ???, ??? ?? ? ??. ??? ??? ?? ??, ??? ?? ?? ?? ?? ???? ????? ??? ??? ???. ? ????? C++ ??? ???? ???? ????? ??? ??? ?? ??? ???? ??? ???? ?? ??? ?????.
1. ??? ???? ???? ?????
???? ???? ???? ???? ???? ???? ??? ??? ??? ???? ???? ???? ?? ?? ?????. ???? ??, ??? ??, ?? ?? ?? ?? ??? ???? ???. ARM Cortex-A ???? ?? ?? ??? ???? ????? ??? ? ????. ?? I2S, PCM ?? ?? ??? ??? ?? ? ?? ?????? ???? ?? ???? ???.
2. ??? ??? ?? ????? ??
C++ ?? ???? ??? ?? ??? ???? ?? ???? ??? ??? ?? ?????? ???? ???. ????? ???? ??? ?? ?????? ??? ????.
- PortAudio: ?? ? ?? ??? ???? ???? ????? ??? ? ?? ??? ??? ??? IO ????????.
- Essentia: ????? ???? ??? ?? ????? ?? ??? ?? ?? ??? ?? ????????.
- FFTW: ??? ??? ??? ?? ??? ??? ? ?? ??? ??? ????????.
?? ?????? ?? ??? ?? ??? ?????? ???? ?? ???? ???? ?????. ?? ?? ??? PortAudio ?????? ???? ??? ?? ? ?? ??? ?????.
#include <stdio.h> #include "portaudio.h" #define SAMPLE_RATE (44100) #define CHANNEL_COUNT (2) #define FRAMES_PER_BUFFER (1024) // 錄制回調(diào)函數(shù) int recordCallback(const void *inputBuffer, void *outputBuffer, unsigned long framesPerBuffer, const PaStreamCallbackTimeInfo *timeInfo, PaStreamCallbackFlags statusFlags, void *userData) { // 處理錄制的音頻數(shù)據(jù) // ... return 0; } // 播放回調(diào)函數(shù) int playCallback(const void *inputBuffer, void *outputBuffer, unsigned long framesPerBuffer, const PaStreamCallbackTimeInfo *timeInfo, PaStreamCallbackFlags statusFlags, void *userData) { // 生成播放的音頻數(shù)據(jù) // ... return 0; } int main() { PaStream *recordingStream; PaStream *playingStream; PaError err; // 初始化PortAudio庫 err = Pa_Initialize(); if (err != paNoError) { printf("Failed to initialize PortAudio "); return 0; } // 打開錄制流 err = Pa_OpenDefaultStream(&recordingStream, CHANNEL_COUNT, 0, paFloat32, SAMPLE_RATE, FRAMES_PER_BUFFER, recordCallback, NULL); if (err != paNoError) { printf("Failed to open recording stream "); return 0; } // 打開播放流 err = Pa_OpenDefaultStream(&playingStream, 0, CHANNEL_COUNT, paFloat32, SAMPLE_RATE, FRAMES_PER_BUFFER, NULL, playCallback); if (err != paNoError) { printf("Failed to open playing stream "); return 0; } // 啟動錄制流 err = Pa_StartStream(recordingStream); if (err != paNoError) { printf("Failed to start recording stream "); return 0; } // 啟動播放流 err = Pa_StartStream(playingStream); if (err != paNoError) { printf("Failed to start playing stream "); return 0; } // 等待用戶按下回車鍵停止程序 getchar(); // 停止錄制流 err = Pa_StopStream(recordingStream); if (err != paNoError) { printf("Failed to stop recording stream "); return 0; } // 停止播放流 err = Pa_StopStream(playingStream); if (err != paNoError) { printf("Failed to stop playing stream "); return 0; } // 關(guān)閉錄制流 err = Pa_CloseStream(recordingStream); if (err != paNoError) { printf("Failed to close recording stream "); return 0; } // 關(guān)閉播放流 err = Pa_CloseStream(playingStream); if (err != paNoError) { printf("Failed to close playing stream "); return 0; } // 終止PortAudio庫 err = Pa_Terminate(); if (err != paNoError) { printf("Failed to terminate PortAudio "); return 0; } return 0; }
3. ??? ???? ? ??
???? ?????? ???? ???? ??? ???? ????? ???? ??? ?? ????? ???. ?? ??? ?????. ????? ??? ?? ??? ?? ???? ? ????.
- ?? ??? ?? ??: ???? ???? ??? ???? ??? ?? ??? ??? ???? ?? ??? ???? ?????. ??? ????? ?? ??? ??? ?? ???? ??? ? ????.
- ???? ??? ???? ??: ???? ??? ????? ???? ???? ??? ???? ?? ? ????. ?? ?? FFT(Fast Fourier Transform) ????? ??? ?? ??? ??? ???? ? ?????.
- ??? ?? ??: ??? ?? ?? ??? ???? ???? ???? ????, ?? ???? ?? ??? ??? ???, ???? ????.
??:
? ???? ???? ????? ??? ??? ?? ??? ???? ?? C++ ??? ??? ?????. ??? ???? ???? ??? ?? ?????? ???? ????? ??? ????? ??? ????? ???? ??? ?? ??? ??? ? ????. ? ??? ???? ???? ??? ?? ?????? ??? ??? ????.
?? ??:
- PortAudio ?? ??: http://www.portaudio.com/
- Essentia ?? ??: http://essentia.upf.edu/
- FFTW ?? ??: http://www.fftw .org/
? ??? C++ ??? ??? ???? ????? ??? ??? ?? ??? ???? ??? ?? ?????. ??? ??? PHP ??? ????? ?? ?? ??? ?????!

? AI ??

Undress AI Tool
??? ???? ??

Undresser.AI Undress
???? ?? ??? ??? ?? AI ?? ?

AI Clothes Remover
???? ?? ???? ??? AI ?????.

Clothoff.io
AI ? ???

Video Face Swap
??? ??? AI ?? ?? ??? ???? ?? ???? ??? ?? ????!

?? ??

??? ??

???++7.3.1
???? ?? ?? ?? ???

SublimeText3 ??? ??
??? ??, ???? ?? ????.

???? 13.0.1 ???
??? PHP ?? ?? ??

???? CS6
??? ? ?? ??

SublimeText3 Mac ??
? ??? ?? ?? ?????(SublimeText3)

C++ ??? ???? ????? ??? ?? ?? ??? ?????. ???? ???? ??? ????? ?????? ???? ?? ?? ???? ?????. ?? ???? ????? ?? ??? ?? ?? ?? ?????. ? ????? C++ ??? ???? ???? ????? ??? ?? ?? ??? ???? ??? ???? ?? ?? ??? ?????. ???? ????? ?? ??? ????? ?? ??? ??? ?? ????? ???? ?????. ??? ?????? ????? ?? ??? ?? ??? ?? ??? ??? ?? ????? ??? ? ????.

???? ??? ??? C++ ????? ??? ? ??? ?? ?? ?? ???? ???? ???? ?? ???? ?? ? ??? ??? ?? ??? ??? ?, ???, ?? ?? ? ?? ???? ?? ???? ????. ??? ???? ???? ?? ???? ????? ???? ???? ???? ???????. ???? ???? ??? ??? ??? ??? ? ?? ?????. ? ????? C++ ??? ???? ???? ???? ????? ??? ? ??? ??? ???? ??? ???? ? ?? ?? ??? ?????. 1. ?????? ??? ????? ??

???? ??? ??? ????(IT) ???? ?? ??? ?????? ?????? ?? ?? ??? ??? ??? ?????. ???? ??? ?? ????? ?? ?? ??? ?? ????? ?? ??? ??? ????? ??? ???? ?? ???????. ? ????? ???? ??? ???? Go ??? ??? ??? ???? ??? ??? ?? ?? ???? ?? ??? ?????. ?? ????? ??? Go ??? ???, ???, ??? ?

C++? ???? ???? ???? ??? ??? ? ??? ?? ?? ?? ???? ???? ?? ??? ?? ? ?????? ???, ?? ??? ???? ??? ? ??? ?? ???? ?? ?????. ??? ??? ???? C++ ??? ???? ???? ???? ??? ??? ? ??? ?? ??? ???? ?? ???? ??? ?????. ? ????? C++ ??? ???? ???? ???? ??? ??? ? ??? ?? ??? ???? ??? ???? ?? ?? ??? ?????. ??? ??? ? ??? ?? ??? ????? ?? ??? ? ??? ??? ?? ????? ???? ???. ????? ???? ????

C++? ??? ???? ??? ??? ?? ?? ?? ? ?? ??: ??? ???? ???? ???? ????? ???? ?? C++? ???? ????? ???? ???? ???? ???? ?? ??? ??? ?????. ? ????? ??? ????, ?? ??? ? ??? ??? ???? C++? ???? ???? ???? ???? ?? ?? ??? ??? ???? ?? ??? ?? ???? ?? ??? ?????. ?? ???? ???? ??? ???? ???? ???? ???, ????, ???? ? ??? ???? ?? ???? ??. ???? ???? ??,

C++? ???? ????? ???? ???? ??? ?? ??? ??????? ???? ?? ?? ??? ??? ?? ??? ??? ??? ???? ???? ? ? ??? ?????. ????? ???? ???? ??? ?? ??? ??????? ????? ??? ????? ??? ?? ??? ???? ???. ? ????? C++ ????? ??? ???? ??? ??????? ???? ??? ?? ?? ??? ???? ??? ??? ? ????. 1. ?? ???? ???? ????? ?????? ??? ????? ?? C++? ???? ????? ?? ??? ?????. ? ??

???? ???? ?? ???? ????? ???? ??????? ??? ????? ??? ?? ? ???? ??, ???? ? ???? ? ?????. ??? ????? ??? C++? ???? ??? ??? ?? ?????. ? ????? C++ ???? ??? ??? ?? ??? ??, ??? ???? ?? ???? ??????? ??? ??? ?????. 1. ???? ??? ?? ?? ???? ??? ???? ???? ???? ?? ?? ??? ??? ?????. ???? ??????? ????? ?? ?? ???? ?? ?????. ???? ??? ??? ???? ???

C++? ???? ???? ???? ??? ?? ??? ???? ?? ???? ???? ?? ??? ?? ??, ? ?? ?? ?? ?? ?? ??? ???? ???. ??? ????? ??? C++? ??? ??? ???? ?? ?? ??? ?????? ?????. ? ????? C++ ????? ??? ???? ???? ????? ??? ?? ??? ???? ??? ???? ? ?? ?? ??? ?????. ??? ???? ?? ???? ?????? ??? ????? ???? ??? ?? ??? ??? ? ????. ???? ????
