none
如何讀取系統音量? RRS feed

  • 問題

  • hi  各位好

     

    小弟有一個問題, 開發 播 wav的程式, 要如何去設定播放音量?     是先讀系統音量及分級, 然後根據而做修改嗎?

    有wince提供的api可用嗎>?

     

    我的環境是 evc4+ppc2003

     

    先感謝您!!

     

    謝謝!!

    2007年5月18日 上午 09:30

解答

  • Hi,在這一篇中有提到相關的一些訊息,宣告相關的部份可以利用關鍵字繼續搜尋下去

    http://msdn2.microsoft.com/en-us/library/aa446550.aspx#pinvokelib_topic_011

     

    部份原文:

    Wave out

    ---------------------------------------------------------------------------

    Code Snippet
    [DllImport ("coredll.dll")]
    protected static extern int waveOutGetNumDevs();

    [DllImport ("coredll.dll")]
    private static extern Wave.MMSYSERR waveOutOpen

    [DllImport ("coredll.dll")]
    protected static extern Wave.MMSYSERR waveOutGetVolume

    [DllImport ("coredll.dll")]
    protected static extern Wave.MMSYSERR waveOutSetVolume

    [DllImport ("coredll.dll")]
    private static extern Wave.MMSYSERR waveOutPrepareHeader

    [DllImport ("coredll.dll")]
    private static extern Wave.MMSYSERR waveOutWrite

    [DllImport ("coredll.dll")]
    private static extern Wave.MMSYSERR waveOutUnprepareHeader

    [DllImport ("coredll.dll")]
    protected static extern Wave.MMSYSERR waveOutClose

    [DllImport ("coredll.dll")]
    protected static extern Wave.MMSYSERR waveOutReset

    [DllImport ("coredll.dll")]
    protected static extern Wave.MMSYSERR waveOutPause

    [DllImport ("coredll.dll")]
    protected static extern Wave.MMSYSERR waveOutRestart

    protected class MMTIME

    [DllImport ("coredll.dll")]
    protected static extern Wave.MMSYSERR waveOutGetPosition

    protected class WAVEOUTCAPS

    [DllImport ("coredll.dll")]
    protected static extern Wave.MMSYSERR waveOutGetDevCaps

     


    2007年5月18日 上午 10:07
    版主

所有回覆

  • Hi,在這一篇中有提到相關的一些訊息,宣告相關的部份可以利用關鍵字繼續搜尋下去

    http://msdn2.microsoft.com/en-us/library/aa446550.aspx#pinvokelib_topic_011

     

    部份原文:

    Wave out

    ---------------------------------------------------------------------------

    Code Snippet
    [DllImport ("coredll.dll")]
    protected static extern int waveOutGetNumDevs();

    [DllImport ("coredll.dll")]
    private static extern Wave.MMSYSERR waveOutOpen

    [DllImport ("coredll.dll")]
    protected static extern Wave.MMSYSERR waveOutGetVolume

    [DllImport ("coredll.dll")]
    protected static extern Wave.MMSYSERR waveOutSetVolume

    [DllImport ("coredll.dll")]
    private static extern Wave.MMSYSERR waveOutPrepareHeader

    [DllImport ("coredll.dll")]
    private static extern Wave.MMSYSERR waveOutWrite

    [DllImport ("coredll.dll")]
    private static extern Wave.MMSYSERR waveOutUnprepareHeader

    [DllImport ("coredll.dll")]
    protected static extern Wave.MMSYSERR waveOutClose

    [DllImport ("coredll.dll")]
    protected static extern Wave.MMSYSERR waveOutReset

    [DllImport ("coredll.dll")]
    protected static extern Wave.MMSYSERR waveOutPause

    [DllImport ("coredll.dll")]
    protected static extern Wave.MMSYSERR waveOutRestart

    protected class MMTIME

    [DllImport ("coredll.dll")]
    protected static extern Wave.MMSYSERR waveOutGetPosition

    protected class WAVEOUTCAPS

    [DllImport ("coredll.dll")]
    protected static extern Wave.MMSYSERR waveOutGetDevCaps

     


    2007年5月18日 上午 10:07
    版主
  • waveOutSetVolume()
    2007年5月18日 上午 11:43