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.
我使用DSMovie类在我的Swing应用程序中播放媒体播放器文件。我需要帮助来改变音量。
DSMovie
Swing
//play movie DSMovie movie = new DSMovie(filename,DSFiltergraph.RENDER_NATIVE,this); //stop movie movie.stop();
谢谢
我从未使用过 DSMovie,但经过大约 1 分钟的互联网研究后,我发现了这一点:
setMasterVolume(浮点数)
所以请在开始使用之前阅读 API 文档
好的,我找到了方法:
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);
谢谢。