2.5.0-alpha1

Here is it: 2.5.0-alpha1. This release wouldn't be possible without contribution from few people, mainly Hendrik Iben (MIDI and Modplug plugins) and Jack Miller (OnSongChange and other features and fixes), but there are more names in the changelog. I'm proud that MOC got to the point where my role is more like a maintainer than an author.

This release includes a demanded option: running a command when song changes. It should be useful for example to scripts that submit data to last.fm. If you think you need something more flexible or have any comments on that, please use the forum.

The full changelog is here:

  • Add Modplug support. (Hendrik Iben)
  • Add MIDI plugin that uses libtimidity - an interface to TiMidity, software-only MIDI sequencer. (Hendrik Iben)
  • Add OnSongChange option which runs a program/script when song is changed. (Jack Miller)
  • Add Y command to prune unreadable files from the playlist. (tyranix)
  • Fix for compilation with FLAC 1.1.3. (Josh Coalson)
  • Support for filenames and directory names recoding using librcc. (Alexey Gladkov)
  • Add a command line option --volume for setting volume. (Jack Miller)
  • Add -t/--on/-off options to change next/repeat/shuffle options. (Jack Miller)
  • Add average bitrate field to the output of mocp -i. (Jack Miller)
  • Add support for "speaker" mixer channel in OSS. Seems to be the only channel that affects volume on iMac (reported by Francesco Versaci).
  • Workaround for Shoutcast streams that have a static title in their metadata (like a radio station name) and the actual title as tags/comments in the stream data.
  • Empty key list for a command in the keymap file is possible.
  • Fix escape key handling. (Jack Miller)
  • Fix CTL-key combinations in entries. (Jack Miller)
  • Fix receive errors handling with internet streams.
  • Fix a memory leak when reading FLAC tags.
  • Fixed "mocp -e directory" command in case when no client is running and the playlist is not empty.
  • Fix ffmpeg build failure due to LOG_H defined by ffmpeg headers.
  • Fix reading PLS playlists with more than 9 entries.
  • Disable 24bit output by default due to reported problems with some sound card. It can be enabled by setting Allow24bitOutput option to yes.
  • Fix configure script: libiconv is required to build moc.

Comments

Congratulations to the new release :-)

But it does not run on my x86_64 machine; neither the 2.5.0-alpha1 nor the current SVN.

For me, it always segfaults when the audio should start (tested with ALSA and OSS). For network-streams, the last lines of server output are :
<br /> Mar 4 17:18:39.949321: io.c:579 io_prebuffer(): done<br /> Mar 4 17:18:39.949384: server.c:254 wake_up_server(): Waking up the server<br /> Mar 4 17:18:39.949431: server.c:1360 server_loop(): Got 'wake up'<br /> Mar 4 17:18:39.949474: server.c:535 send_events(): Flushing events for client 0<br /> Mar 4 17:18:39.949522: out_buf.c:323 out_buf_reset(): resetting the buffer<br />

Using local files (of any format) I get :
<br /> Mar 4 17:19:03.442445: server.c:254 wake_up_server(): Waking up the server<br /> Mar 4 17:19:03.450047: server.c:1360 server_loop(): Got 'wake up'<br /> Mar 4 17:19:03.450166: server.c:535 send_events(): Flushing events for client 0<br /> Mar 4 17:19:03.462462: timidity.c:78 timidity_open(): Opened file /home/hendrik/d2xhog/BRIEFING.MID<br /> Mar 4 17:19:03.463433: audio.c:1003 audio_plist_set_time(): Setting time for /home/hendrik/d2xhog/BRIEFING.MID<br />

I have not checked on my x86 machine yet but maybe this is architecture specific...

*edit*
This also happens on my x86...
I tried to trace the server-thread but I could not find anything useful in it's output...
If I find out about this, I'll post...

Can you use the core file and get the back trace?

--
Damian Pietras - MOC developer

Okay, this is more clear now, I hope...

For both (streams and files) the segfault seems to come from a call to strlen :

Could this be a bug in the new on song change feature ? I have not set it up to do anything; maybe I should ?

<br /> #0 0x00002b7abe03b420 in strlen () from /lib/libc.so.6<br /> (gdb) bt<br /> #0 0x00002b7abe03b420 in strlen () from /lib/libc.so.6<br /> #1 0x00002b7abe03b166 in strdup () from /lib/libc.so.6<br /> #2 0x000000000040ce91 in on_song_change () at server.c:398<br /> #3 0x000000000040d249 in add_event_all (event=1, data=0x0) at server.c:477<br /> #4 0x000000000042703f in player (file=0x41802170 "", next_file=0x639320 "http://212.73.29.83:8000", out_buf=0x550fa0)<br /> at player.c:705<br /> #5 0x0000000000413a19 in play_thread (unused=0x0) at audio.c:417<br /> #6 0x00002b7abd7af11a in start_thread () from /lib/libpthread.so.0<br /> #7 0x00002b7abe083d13 in clone () from /lib/libc.so.6<br />

*edit*
Yep... I just set OnSongChange = "/usr/bin/true" and now it plays...
This should be easy to fix... ;-)

I can't reproduce that, but please try the following patch:
<br /> --- server.c (revision 1982)<br /> +++ server.c (working copy)<br /> @@ -395,7 +395,7 @@<br /> return;</p> <p> curr_file = audio_get_sname();<br /> - command = strdup(options_get_str("OnSongChange"));<br /> + command = xstrdup(options_get_str("OnSongChange"));</p> <p> if((command)&amp;&(curr_file) &amp;&<br /> ((!last_file) || (strcmp(last_file,curr_file)))) {<br />

--
Damian Pietras - MOC developer

Yes. This works for me. :-)

Testet with:
aac, flac (1.1.2), mp3, mpc, ogg, spx, wav, wma, mod
on both i386 and ppc.

Unofficial debs are available:

deb http://www.lxtec.de/debarchiv unstable main
deb-src http://www.lxtec.de/debarchiv unstable main

Damian, could youplease update http://moc.daper.net/download to the above mentioned sources.list entries?

Thanks
Elimar

--
The path to source is always uphill ;-)

Done, thanks.
--
Damian Pietras - MOC developer

Could you please provide an escape for the track-length in the configfile? (maybe %l?)
This would make it pretty easy to talk to lastfmsubmitd with "OnSongChange".

Nonetheless, great release. Thanks!

Yes, it's not so hard, I'll add it in the next release.

--
Damian Pietras - MOC developer

Everything works great! Waiting for a last.fm plugin :)
And here are packages for KateOS (TGZex):
Repositories:
http://kateos.org/download/packages/dist3-community-stable/
http://kateos.org/download/packages/dist3-community-unstable/
--
Currently packages are in unstable repo.
www.kateos.org

Nice, thanks :)
Are those URL's ready to appear at the download page of this site? I don't know KateOS and don't know how packages work in this OS, posting these URLs is enough?

--
Damian Pietras - MOC developer

On download page should be something like this:

------

Add following repositories to /etc/updateservers (or unhash, if you already have them):

http://kateos.org/download/packages/dist3-community-stable/
http://kateos.org/download/packages/dist3-community-unstable/

Install by typying:
# updateos -i mocp

------

PS: Packages are tested.

I've added this information to the download page. If you are the author of the packages, say what is your name if you want to be mentioned there.

--
Damian Pietras - MOC developer

Yes, I'm the author of the packages, but I want to stay "anonymous" :)
Pozdrawiam :)

Twój wybór :)

--
Damian Pietras - MOC developer

Everything is allright with filenames and directory names in filebrowser with patch from Alexey Gladkov. But title of filebrowser still contains #####...