我用MEDIAPLAYER控件做了一个播放器,但是不知道在播放VCD时怎样实现左右声道的转换。我用MCISENDSTRING只能实现左右喇叭的转换,哪位大哥能帮忙解决这个问题呢??
各位大哥,小弟刚进来,上次提问没有注意看分数!!这次悬赏100分,如果各位能用CB或者DEPHI解决的话

解决方案 »

  1.   

    用WaveOutSetVolume函数,如:WaveOutSetVolume(1,(Rtack shl 16)+Ltack);
    Rtack表示右声道音量,Ltack表示左声道音量。
      

  2.   

    已经是DELPHI的代码了,BUILDER的俺还不会呢:)这是个API函数,Rtack,Ltack两个参数自己设置。函数原形如下:
    MMRESULT waveOutSetVolume(HWAVEOUT hwo, DWORD dwVolume);  Sets the volume level of the specified waveform-audio  output device.?Returns MMSYSERR_NOERROR if successful or an error otherwise. Possible error values include the following:MMSYSERR_INVALHANDLE Specified device handle is invalid.
    MMSYSERR_NODRIVER No device driver is present.
    MMSYSERR_NOMEM Unable to allocate or lock memory.
    MMSYSERR_NOTSUPPORTED Function is not supported.
    hwoHandle of an open waveform-audio output device. dwVolumeNew volume setting. The low-order word contains the left-channel volume setting, and the high-order word contains the right-channel setting. A value of 0xFFFF represents full volume, and a value of 0x0000 is silence.
    If a device does not support both left and right volume control, the low-order word of dwVolume specifies the volume level, and the high-order word is ignored.
      

  3.   

    例程:http://www.topdelphi.net/Article_Show.asp?ArticleID=28&ArticlePage=1
      

  4.   

    这个我早就看了,问题是我是用MEDIAPLAYER做的,他是用MCI控制的
      

  5.   

    这个问题本来csdn上有详细解答的,不过改版后都不见了!!我只有回去找找看了!!
      

  6.   

    mciSendCommand(MediaPlayer1.DeviceID,MCI_SETAUDIO,MCI_SET_OFF,integer(@s));