Roja Report post Posted December 28, 2005 Is it possible to make a command to see what current song is playing? #current_song Current song is: Castle Road by Zenogias It's ok if that line would have to be defined, maybe in the .pll's aside the song definition. Share this post Link to post Share on other sites
ttlanhil Report post Posted December 28, 2005 it shouldn't be that hard to do, and no changes to the .pll should be required, the name and author can be saved in the music file itself (I just checked castle road, and that one is... I can't be certain I didn't do it myself though) it's highly probably that the ogg library we're using has the function to read the song name and artist from the file readily available, so we'd only need to do that when we load the song and remember it, adding the command is simple. I'm going out shortly, but I'll look into this when I get home again. shouldn't take too long to make the changes Share this post Link to post Share on other sites
Roja Report post Posted December 28, 2005 hm, then we'd have to make sure that that info IS in all the .ogg files. If not we'll have to put it there...i'll have to find out how to do that. Share this post Link to post Share on other sites
ttlanhil Report post Posted December 28, 2005 I kinda figured I'd do like winamp does; if the title isn't known, then use the file name (and don't list the artist if you don't know it) but yes, all .oggs should be given the right details, any media player that can play oggs should be able to edit the comments (such as title and artist) okay, I checked, 9 by Zenogias have the comments included, the rest of the files don't Share this post Link to post Share on other sites
crusadingknight Report post Posted December 28, 2005 (edited) Vorbis spec actually; the data structure: Vorbisfile: http://xiph.org/vorbis/doc/vorbisfile/vorbis_comment.html Commenting: http://www.xiph.org/vorbis/doc/v-comment.html Getting the comment: http://www.xiph.org/vorbis/doc/vorbisfile/ov_comment.html Anyway, to edit comments, just use the vorbiscomment program from the vorbis-tools download on vorbis.com Edited December 28, 2005 by crusadingknight Share this post Link to post Share on other sites
ttlanhil Report post Posted December 30, 2005 the patch is made now, thanks to help from lachesis (I can't play music in my client, so I needed someone else to test it. luckily only a few changes were needed) lachesis intends to do a review of that and a couple other of my patches and commit them if they're workable; but anyone else is welcome to check it for possible improvements (patch is here) currently, only the songs by Zenogias have the title and artist info set, so for any other song you will get the file name. if the title is set but no artist, that works too. if there's an artist but no title, we just do filename and ignore artist example output: Currently playing: "Castle Road" by Zenogias (2:04/2:32) Currently playing: "City By Night" (1:00/1:47) Currently playing: "nightcity1.ogg" (0:13/2:44) No song is currently playing This client was built without music support "city by night" does have the artist set, I'm pretending it doesn't for the example hopefully no-one will ever see the last message... but in case someone compiles the client without music and then tries to find out what song is playing( ) they get that message Share this post Link to post Share on other sites
crusadingknight Report post Posted December 31, 2005 Pretty. Just one little comment - You may want to add a newline at the end of sound.c to stop it throwing warnings with gcc. Share this post Link to post Share on other sites
Roja Report post Posted December 31, 2005 great thankyou so much! Share this post Link to post Share on other sites
ttlanhil Report post Posted January 1, 2006 Pretty. Just one little comment - You may want to add a newline at the end of sound.c to stop it throwing warnings with gcc. okay, that's done... warnings with gcc from no newline? interesting... Share this post Link to post Share on other sites
crusadingknight Report post Posted January 1, 2006 warnings with gcc from no newline? interesting... I believe that it's based on the assumption that people will hit enter after finishing a function, etc., thus lack of one meaning they didn't finish, crashed, or something. Share this post Link to post Share on other sites
ttlanhil Report post Posted January 2, 2006 I believe that it's based on the assumption that people will hit enter after finishing a function, etc., thus lack of one meaning they didn't finish, crashed, or something. or an incomplete file transfer, yes. in the *nix world most text editors add the newline at the end when you save anyway, so when in *nix the compiler assuming a newline is fair enough I ust need to vet my patches a bit more thoroughly (since there's usually other changes mixed in the typical patch needs to be trimmed down anyway, so I go through them... I missed that no-eol thing in the patch file though <_< ) Share this post Link to post Share on other sites
Roja Report post Posted February 10, 2006 Can someone apply this patch if it hasn't been? Share this post Link to post Share on other sites
crusadingknight Report post Posted February 11, 2006 Can someone apply this patch if it hasn't been? It doesn't look like it could break anything, or even really have bugs, so I suggest ttlanhil merge it? Share this post Link to post Share on other sites
ttlanhil Report post Posted February 11, 2006 It doesn't look like it could break anything, or even really have bugs, so I suggest ttlanhil merge it? ttl would have, but ttl quit. his patches will need to be reviewed and commited by someone else Share this post Link to post Share on other sites
ttlanhil Report post Posted February 17, 2006 ttl would have, but ttl quit. his patches will need to be reviewed and commited by someone else ttl ended up doing it anyway. patch has been comitted Share this post Link to post Share on other sites
Roja Report post Posted February 17, 2006 ttl was a nice ttl to finish it up. Thanks Share this post Link to post Share on other sites