Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
最後にいくつかのサウンドを追加したい大きなウェーブ ファイルがあります。そして、私はこれをループに追加するので、毎回それを読んで短い部分を追加して閉じるのは賢明ではありません(このようにアルゴリズムは非常に遅いです)。matlab(waveファイル)で別のサウンドファイルの最後にサウンドファイルを追加するための最適化された方法はありますか?
追加中にメモリに保持するのはどうですか?
big = wavread('big.wav'); flist = dir('*.wav'); for i=1:length(flist) short = wavread(flist(i).name); big = [big, short]; end wavwrite(big, 'bigger.wav');
bigvectorに追加するサンプルの数がわかっている場合は、必要なスペースを事前に割り当てておいた方が高速です。
big