General discussion

Here you can discuss everything related to MOC which doesn't fit other subforum.

when pressing "next" key multiples times, first song is selected

Hi,
When I want to go several songs forward, I usually hit the next key (n) several times very quickly. After a few hits (between, 3 and 10), cursor stops going forward, but instead, it goes back to first song of the playlist :(

So, I investigated, and I think I known where the problem comes from:

When you press "next" while a song is playing, you go in function cmd_next (interface.c); curr_file.state is checked. As a song is playing right now, curr_file.state is not STATE_STOP. So you go out from decode_loop, you go back in play_thread (audio.c), you arrive at the end of the big while loop, you execute update_state, and therefore, curr_file.state is set to STATE_STOP.

Then, the big while loop loops one more time, you call player, then play_file, and just before you call decode_loop, curr_file.state is set to STATE_PLAY again (in audio_state_started_playing function)

My problem arises when I press next key after update_state, but before audio_state_started_playing. A new song is being loaded, and status is STATE_STOP. So, in function cmd_next, the second branch of the if test is triggered, and first song is selected again.

I tried to move the call to audio_state_started_playing at the beginning of play_file, and the problem seemed to have dispappeared. But it was just to test if problem really came from that race solution, may be it is not a solution. I did not investigate more, but I guess play_file function loads files from cache or from disk. As only one file is cached, it will have to get songs from disk if I hit "next" several times in a row. So, race condition I described is very likely to occur.

Unfortunately, I'm not good developer enough to correct that, and to submit a patch, but I hope this will help.

And also, thanks for mocp, it's a really nice music player :)

MOC in "Debian Package of the Day" web page

Hi everyone,

Since I like MOC so much, I recently wrote an article about it, which can be found here: http://debaday.debian.net/ . I don't have any coding skills, so spreading the word about this great app is the best and humble thing I can do. Note that comments of readers and users were very possitive so far.

MOC rocks!!.
Developers: keep up with the good work!.
:-)

Regards!.

PS: The way I see it, it would be nice if an email adress is provided somewhere in the website, so that anyone could write to the MOC team.

UTF8 and arabic file names

first I want to thank you for this fantastic music player :)

I have media files with Arabic names, so I go to edit the config file and made this UseRCCForFilesystem = yes

and when I run mocp it give me this ~$ mocp
Wrong option name: 'UseRCCForFilesystem'.
FATAL_ERROR: Error in config file, line 136.

I don't know what's wrong here?!

Is there any way to display arabic filenames correctly?

Thanks.

UTF8 and arabic file names

first I want to thank you for this fantastic music player :)

I have arabic file names so i go to edit the config file and made this UseRCCForFilesystem = yes

and when I run mocp it give me this ~$ mocp
Wrong option name: 'UseRCCForFilesystem'.
FATAL_ERROR: Error in config file, line 136.

I don't know what's wrong here?!

Is there any way to display arabic filenames correctly?

Thanks.

focus in playlist

Hi,
i habe configured moc, that the playlist occupy the whole screen.
Layout1 = "playlist:0,0,100%,100%".
But when I start moc, the directory is focused and i must tab to reach the playlist.
How can I change this?

Regards
Achim

Malformed Layout1

Hello,

I can only start mocp when i put the following in my config:

Layout1 = "directory:0,0,100%,100% playlist:0,0,100%,100%"
Layout2 = "directory:0,0,50%,100% playlist:50%,0,50%,100%"

If i don't do i can't start due to "malformed layout1"

moc 2.4.2 Build: Jul 10 2007 14:50:18
Compiled with: OSS ALSA internet streams

AAC stream not working with moc :(

Another issue thats been giving me the shits is getting AAC streams to play on moc 2.5
ffmpeg is compiled with libfaac and libfaad(v2) support, but moc still says unsupported format! arghh!!
any help?

# ldd libavformat.so
linux-gate.so.1 => (0xffffe000)
libavutil.so.49 => /usr/local/lib/libavutil.so.49 (0xb7f33000)
libavcodec.so.51 => /usr/local/lib/libavcodec.so.51 (0xb7aaa000)
libz.so.1 => /usr/lib/libz.so.1 (0xb7a95000)
libdl.so.2 => /lib/libdl.so.2 (0xb7a91000)
libc.so.6 => /lib/libc.so.6 (0xb794e000)
libm.so.6 => /lib/libm.so.6 (0xb7927000)
libfaac.so.0 => /usr/local/lib/libfaac.so.0 (0xb7915000)
libfaad.so.0 => /usr/local/lib/libfaad.so.0 (0xb78b5000)
/lib/ld-linux.so.2 (0x80000000)

/usr/local/lib/moc/decoder_plugins # ldd libffmpeg_decoder.so
linux-gate.so.1 => (0xffffe000)
libavformat.so.51 => /usr/local/lib/libavformat.so.51 (0xb7ede000)
libavcodec.so.51 => /usr/local/lib/libavcodec.so.51 (0xb7a55000)
libz.so.1 => /usr/lib/libz.so.1 (0xb7a40000)
libfaac.so.0 => /usr/local/lib/libfaac.so.0 (0xb7a2f000)
libfaad.so.0 => /usr/local/lib/libfaad.so.0 (0xb79cf000)
libdl.so.2 => /lib/libdl.so.2 (0xb79cb000)
libavutil.so.49 => /usr/local/lib/libavutil.so.49 (0xb79c0000)
libm.so.6 => /lib/libm.so.6 (0xb7999000)
libpthread.so.0 => /lib/libpthread.so.0 (0xb7982000)
libc.so.6 => /lib/libc.so.6 (0xb783f000)
/lib/ld-linux.so.2 (0x80000000)

Jul 7 05:53:26.676907: io_curl.c:342 curl_read_internal(): Doing select()...
Jul 7 05:53:26.677164: server.c:668 server_error(): ERROR: Format not supported
Jul 7 05:53:26.677194: server.c:256 wake_up_server(): Waking up the server
Jul 7 05:53:26.677224: io.c:273 io_close(): Closing stream...

libffmpeg_decoder seems to load ok aswell.

# mocp -T darkdot_theme ~/.moc/test.m3u --debug
Loading plugins from /usr/local/lib/moc/decoder_plugins...
Loading plugin libffmpeg_decoder...
OK
Loading plugin libmp3_decoder...
OK
Running the server...
Trying OSS...

[PATCH] moc with libcurl4 (7.16.x)

For those who are trying to get streaming radio to work with moc + libcurl3/4 I found a fix.
new version of libcurl by default use HTTP/1.1 you can force it use HTTP/1.0 with following patch

Happy patching!

BR,
Samid Tennakoon

Index: io_curl.c
===================================================================

--- io_curl.c	(old)
+++ io_curl.c	(new)
@@ -234,6 +234,7 @@
 	s->curl.http_headers = curl_slist_append (NULL, "Icy-MetaData: 1");
 
 	curl_easy_setopt (s->curl.handle, CURLOPT_NOPROGRESS, 1);
+	curl_easy_setopt (s->curl.handle, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_0);
 	curl_easy_setopt (s->curl.handle, CURLOPT_WRITEFUNCTION,
 			write_callback);
 	curl_easy_setopt (s->curl.handle, CURLOPT_WRITEDATA, s);

Pages

Subscribe to RSS - General discussion