掲示板システム
ホーム
アクセス解析
カテゴリ
ログアウト
bluetooth マイクからの音声入力 (ID:70962)
名前
ホームページ(ブログ、Twitterなど)のURL (省略可)
本文
オショウさん、レスありがとうございます。 メイン関数の中はこんな感じです。クラスなどは何一つ変えていません。 _______________________________ CVoiceRecording m_Record; CVoicePlaying m_Play; m_Record.PrepareBuffer(10); //prepare buffer for recording 10 seconds. m_Record.Open(); m_Play.PrepareBuffer(10); //prepare buffer for playing of 10 seconds of data m_Play.Open(); if (m_Record.IsOpen()) { printf("Please speak at the microphone. \n"); m_Record.Record(); printf("The voice will be announced soon. \n"); } //after finishing the record scenario, //play the buffer, first copy recorded buffer to m_Play buffer m_Play.CopyBuffer(m_Record.buffer, 10); if (m_Play.IsOpen()) { m_Play.Play(); } m_Record.Close(); m_Play.Close(); m_Record.DestroyBuffer(); m_Play.DestroyBuffer(); ____________________ クローズ・メモリの解放も加えてましたが、やはり即座にプログラムが終了してしまいます。 おしょうさんのおっしゃる通り、waveInProcやstartあたりがおかしいのかもしれません。そのあたりについて調べてみたいと思います。 また、有線マイクなら問題なくできるかについては手元に通常のマイクがないので購入して試してみたいと思います。
←解決時は質問者本人がここをチェックしてください。
戻る
掲示板システム
Copyright 2020 Takeshi Okamoto All Rights Reserved.