如何用软件方法调整播放WAV文件的速率?(200分)

  • 主题发起人 CathyEagle
  • 开始时间
C

CathyEagle

Unregistered / Unconfirmed
GUEST, unregistred user!
用waveOutSetPlaybackRate似乎可以调整,但运行之后没有任何反应。
下面的话来自MSDN
---------------------------------------------------------------------
Remarks

Changing the playback ratedo
es not change the sample rate butdo
es
change the playback time. Not all devices support playback rate changes.
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
To determine whether a device supports playback rate changes, use the
WAVECAPS_PLAYBACKRATE flag to test the dwSupport member of the WAVEOUTCAPS
structure (filled by the waveOutGetDevCaps function).
---------------------------------------------------------------------

但我记得Winamp有一个插件可以调整播放WAV文件的速率,而且不受设备限制,
不知哪位大虾有这方面的资料,或者实现代码,或者控件,望不吝赐教。
 
C

CathyEagle

Unregistered / Unconfirmed
GUEST, unregistred user!
S

Sachow

Unregistered / Unconfirmed
GUEST, unregistred user!
我也想要!
 
C

CathyEagle

Unregistered / Unconfirmed
GUEST, unregistred user!
C

Chenlili

Unregistered / Unconfirmed
GUEST, unregistred user!
如果从纯软件的角度来讲,只能用改变采样率的方法。人为将波形拉长
当然做起来还是比较麻烦的
 
C

Chenlili

Unregistered / Unconfirmed
GUEST, unregistred user!
不好意思,网络出了一点问题,
1、(waveOutOpen((LPHWAVEOUT)&hWaveOut, WAVE_MAPPER,
(LPWAVEFORMAT)pFormat,
(LONG)hwndApp, 0L, CALLBACK_WINDOW))
2、var
Pdwpitch : PDWORD;
begin

new(pdwpitch);
{Get Trackbarposition and Round it for 0,001 % steps}
pdwPitch^ := 65536+Round(65536/1000*100*(-1));

waveoutSetplaybackrate(hwaveoutLeft^, Pdwpitch^);
dispose(pdwpitch);
哎,call你你有不复机,大哥,你现在在深圳吗?什么时候聚聚。
 
C

CathyEagle

Unregistered / Unconfirmed
GUEST, unregistred user!
Chenlili,你的代码似乎不管用啊,有没有再完整一点的?发给我。
我没收到你的传呼。
我刚辞职了,过几天就离开深圳。
 
C

caofx

Unregistered / Unconfirmed
GUEST, unregistred user!
playbackrate是调节频率的!应该用mci中的set speed命令!
 

雨人

Unregistered / Unconfirmed
GUEST, unregistred user!
to CathyEagle.
我来灌水,哈哈
 
C

CathyEagle

Unregistered / Unconfirmed
GUEST, unregistred user!
To caofx
set speed只对某些设备有用,比如video,对wav没用。
To 雨人
好久不见,我最近上网条件很差,没上oicq.
 
C

caofx

Unregistered / Unconfirmed
GUEST, unregistred user!
我试过,setspeed对wav、mp3都有效。
 
C

CathyEagle

Unregistered / Unconfirmed
GUEST, unregistred user!
caofx兄:
  果真如此的话,分就是你的了。等我回去试试。
 
Y

yzman

Unregistered / Unconfirmed
GUEST, unregistred user!
这个问题解决了吗???
 
C

cheka

Unregistered / Unconfirmed
GUEST, unregistred user!
多人接受答案了。
 
顶部