0
我使用DSMovie
類在我的Swing
應用程序中播放媒體播放器文件。 我需要幫助來改變音量。使用DSMovie的Swing媒體播放器
//play movie
DSMovie movie = new DSMovie(filename,DSFiltergraph.RENDER_NATIVE,this);
//stop movie
movie.stop();
感謝
我使用DSMovie
類在我的Swing
應用程序中播放媒體播放器文件。 我需要幫助來改變音量。使用DSMovie的Swing媒體播放器
//play movie
DSMovie movie = new DSMovie(filename,DSFiltergraph.RENDER_NATIVE,this);
//stop movie
movie.stop();
感謝
好吧,我找到了方法:
DSMovie movie = new DSMovie(filename,DSFiltergraph.RENDER_NATIVE,this);
movie.setVolume(1);
//to raise the volume
movie.setVolume(movie.getVolume()+0.02);
//to lower the volume
movie.setVolume(movie.getVolume()-0.02);
謝謝。
我在網上搜索了1分多鐘,發現了setMasterVolume(float)的文檔。問題是我使用的類沒有這個功能,我有setVolume(float),當我使用它時什麼也不做。 – user1206529 2012-08-08 15:59:57