General discussion

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

patch: looping info

Hi, I needed up-to-date/second information for a script watching as moc is playing.
I'm quite sure it's not really the proper way to do this, but unless someone comes up with a better idea, here's the patch for it.
What it does:
Add's the options -I and --infoloop as well as the required code to main.c for a looping --info.

Comments are welcome ;-)

moc-2.3.2-infoloop.patch

--- main.c 2005-09-25 09:59:15.000000000 +0200
+++ main.c 2005-10-25 00:39:48.000000000 +0200
@@ -55,6 +55,7 @@
int next;
int previous;
int get_file_info;
+ int loop_file_info;
int toggle_pause;
int recursively;
int playit;
@@ -289,6 +290,17 @@
interface_cmdline_play_first (server_sock);
if (params->get_file_info)
interface_cmdline_file_info (server_sock);
+ while (params->loop_file_info) {
+ printf("\nINFO COMPLETE\n\n");
+ if (fflush(stdout)) {
+ options_free ();
+ decoder_cleanup ();
+ compat_cleanup ();
+ exit; // error
+ }
+ sleep(2);
+ interface_cmdline_file_info (server_sock);
+ }
send_int (server_sock, CMD_DISCONNECT);
}
else if (params->only_server)
@@ -374,6 +386,7 @@
"-n --nosync Don't synchronize the playlist with other clients.\n"
"-A --ascii Use ASCII characters to draw lines.\n"
"-i --info Print the information about the currently played file.\n"
+"-I --infoloop Print the information about the currently played file in a loop.\n"
"-e --recursively Make a playlist from the content of the directory given\n"
" at the command line.\n"
, prg_name);
@@ -476,6 +489,7 @@
{ "nosync", 0, NULL, 'n' },
{ "ascii", 0, NULL, 'A' },
{ "info", 0, NULL, 'i' },
+ { "infoloop", 0, NULL, 'I' },
{ "recursively", 0, NULL, 'e' },
{ 0, 0, 0, 0 }
};
@@ -486,7 +500,7 @@
memset (&params, 0, sizeof(params));
options_init ();

- while ((ret = getopt_long(argc, argv, "VhDSFR:macpsxT:C:M:PUynArfiGel",
+ while ((ret = getopt_long(argc, argv, "VhDSFR:macpsxT:C:M:PUynArfiIGel",
long_options, &opt_index)) != -1) {
switch (ret) {
case 'V':
@@ -528,6 +542,11 @@
params.get_file_info = 1;
params.dont_run_iface = 1;
break;
+ case 'I':
+ params.get_file_info = 1;
+ params.dont_run_iface = 1;
+ params.loop_file_info = 1;
+ break;
case 'p':
params.play = 1;
params.dont_run_iface = 1;

BTW: is it possible to attach files somehow?

Problem doing -make- on 2.4.0-alpha1

I just downloaded the development version because I need the function Damian mentioned here: http://moc.daper.net/node/61

configure runs without error but make tells me this:

make[2]: *** [mocp] Error 1
make[2]: Leaving directory `/var/apache/webdev/moc-DEVEL'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/var/apache/webdev/moc-DEVEL'
make: *** [all] Error 2

And some lines above

if gcc -DHAVE_CONFIG_H -I. -I. -I. -DSYSTEM_THEMES_DIR=\"/usr/local/share/moc/themes\" -DPLUGIN_DIR=\"/usr/local/lib/moc/decoder_plugins\" -pthread -g -O2 -Wall -W -MT ltdl.o -MD -MP -MF ".deps/ltdl.Tpo" -c -o ltdl.o ltdl.c; \
then mv -f ".deps/ltdl.Tpo" ".deps/ltdl.Po"; else rm -f ".deps/ltdl.Tpo"; exit 1; fi
ltdl.c: In function `sys_dl_open':
ltdl.c:1104: warning: unused parameter `loader_data'
ltdl.c: In function `sys_dl_close':
ltdl.c:1119: warning: unused parameter `loader_data'
ltdl.c: In function `sys_dl_sym':
ltdl.c:1135: warning: unused parameter `loader_data'
ltdl.c: In function `presym_init':
ltdl.c:1948: warning: unused parameter `loader_data'
ltdl.c: In function `presym_exit':
ltdl.c:1989: warning: unused parameter `loader_data'
ltdl.c: In function `presym_open':
ltdl.c:2035: warning: unused parameter `loader_data'
ltdl.c: In function `presym_close':
ltdl.c:2085: warning: unused parameter `loader_data'
ltdl.c: In function `presym_sym':
ltdl.c:2095: warning: unused parameter `loader_data'
ltdl.c: In function `foreach_dirinpath':
ltdl.c:2684: warning: comparison between signed and unsigned
ltdl.c:2693: warning: comparison between signed and unsigned
ltdl.c: In function `find_handle_callback':
ltdl.c:2769: warning: unused parameter `ignored'
ltdl.c: In function `load_deplibs':
ltdl.c:2807: warning: unused parameter `deplibs'
ltdl.c: In function `try_dlopen':
ltdl.c:3137: warning: comparison between signed and unsigned
ltdl.c: In function `lt_dlpath_insertdir':
ltdl.c:3989: warning: comparison between signed and unsigned

I'm using Debian Sarge with Kernel 2.4
Does anyone has an Idea?

Equalizer

Hi, i know this is on the wishlist already but would it be possible to push this forward?
It is like the only thing that is stopping me from regulary using moc.
Even if it is a simple equalizer that can only be configured by values in a text file, i wouldn't mind.
moc is awesome otherwise!
Keep it rockin, \m/

xsquared.

FATAL_ERROR: No valid sound driver

ok firstly im a bit of a noob ive not been using linux long anyway ive had moc about a month now and its great but due to a few problems with my system i had to remove it anyway i complied it the other day and everything seemd to work ok at first but when i loaded moc all i get is FATAL_ERROR: No valid sound driver at the moment its set to run of alsa becasuse i have that set up to dmix ive tried it off over sound drivers with the same results. any ideas thanks

Iconv support seems to be broken in 2.4.0-alpha1

There no any difference between
TagsIconv = WINDOWS-1251:KOI8-R
end no TagsIconv..
I get this error with mp3 files.

crossfading effect for moc

hello,

is it possible (any future plans) to add configurable %subj? thank you. btw i was looking for something like moc quite some time (mplay.sf.net is not bad but moc suits me better). good job done!

cheers,

-- joe

shuffled play startup from command line

Hey, I really like the idea of music daemon in the background and not requiring any user interface, because this is exactly how I listen to music most of the time.
So I have Repeat=yes, Shuffle=yes in ~/.moc/config.
The playlist is ~/.moc/playlist.m3u and it contains all music accessible to me.
With such setup, how do I start playing with minimal interaction?
e.g. the following just don't do their job properly:
mocp --play
mocp --play ~/.moc/playlist.m3u

For now the only solution I know is to go and select the first song with:
mocp ~/.moc/playlist.m3u

I really don't care which song is going to be first, I prefer random choice when Shuffle=yes and probably the first one in playlist when Shuffle=no.

I use moc-2.3.2 from Debian. I could not locate your previous forum, so this post is probably a duplicate..
anyway, please post a command line solution if there is one, or otherwise I will file a bugreport :)

thanks!

CPU Utilisation

First of all: I've recently found this player and can say that's just what I need! But... I think the CPU utilisation still can be improved. I know that's not so important nowadays with all our modern computers, but we (I hope) would like to see _really_ perfect applications! Why I think so? As an example: mplayer can play the same content from console and uses 2-5 times less CPU then moc!

Pages

Subscribe to RSS - General discussion