From: Storm D. <sto...@gm...> - 2015-09-25 21:03:53
|
Howdy, It still seems to have the same problem. I'm trying to use cmus to play background music for areas in a MUD. The code is in a tintin++ script. Here's what I have, just so you can see if what I did looks right. $backgroundMusicTrack is the name of the track that is played. The variable is passed to a system command that runs it, along with the file name, so putting $backgroundMusicTrack in the play variable would call the track twice. At least that's my theory of what it is doing lol. But, if there were a way to not have to call the filename twice, that would be cool. Here's the variables that handle cmus stuff: #variable {bgmPlayer} {cmus}; #variable {bgmPlay} {cmus-remote -l -c -f $backgroundMusicTrack}; #variable {bgmStop} {cmus-remote -s}; #variable {bgmVolumeDown} {cmus-remote -v -5%}; #variable {bgmVolumeUp} {cmus-remote -v +5%}; #system {cmus-remote -C "set repeat=true"} I did it this way so there can be multiple options for the background music player. So far I have moc and xmms2 working. I made cmus the default player though, because it is so much easier to configure than the others, especially when it comes to softvol. Thanks for the help Storm On Fri, Sep 25, 2015 at 03:55:59PM -0400, Jason Woofenden wrote: >Hi Storm, > >First, note that cmus does not act on your commandline flags in >order, it parses them all, and then acts on them in it's own order. > >This enables eg the -l flag to effect all operations (eg it makes >the -c flag clear the library). > >That said... It looks like it's processing your flags in a good >order. > >My first guess: The issue you're having is because files are added >to the library asynchronously (I think), thus the track you want >played is not in the library yet by the time the -p flag is acted >upon. > >I suggest: using ``-f trackname.opus`` instead of ``-s -p``. That >will play that file immediately (whether it's in your library or >not). Surely by the time the track finishes, the "add to library" >part will have finished, and the repeat should work. > >Another possible problem is that your cmus is not in "play from >library" mode (eg it's playing from the playlist). > >Try this if you'd like to manipulate the playlist: > > cmus-remote -P -c -f filename.opus filename.opus > >Or this for the library: > > cmus-remote -l -c -f filename.opus filename.opus > >Be sure to put the filename in twice, as above. The first one is >passed to -f (play immediately) and the second for adding to the >playlist/library. > >Also, be sure cmus is playing from whichever one you're >manipulating. Shift-M in cmus toggles this. > >-- >Jason -- Powered by Arch Linux! I am registered Linux user number 508465: https://linuxcounter.net/user/508465.html My blog, Thoughts of a Dragon: http://www.stormdragon.tk/ get my public PGP key: gpg --keyserver wwwkeys.pgp.net --recv-key 43DDC193 Twitter and Facebook are so ... yesteryear. Get your 2MB Social account TODAY! http://2mb.social/main/register How many Internet mail list subscribers does it take to change a lightbulb? http://goo.gl/eO4PJ "We sail the endless oceans, we sail the raging seas. The quest is never ending, it leads us to destiny." Alestorm- The Quest |