21 Dec 2008 14:22
15 Dec 2008 04:14
can't play songs
paulalt (via Nabble <ml-user+132065-1111619267 <at> n2.nabble.com>
2008-12-15 03:14:13 GMT
2008-12-15 03:14:13 GMT
Every time I want to play a song on herrie there is this message showing up: 'Sample rate or amount of channels not supported.'
My OS is Ubuntu 8.10, and no problem with playing songs on other music players.
This email is a Public Email sent by paulalt
Your replies will appear at http://n2.nabble.com/can%27t-play-songs-tp1656562p1656562.html
To subscribe to this discussion, click here
Public Email is a Nabble idea.
Your replies will appear at http://n2.nabble.com/can%27t-play-songs-tp1656562p1656562.html
To subscribe to this discussion, click here
Public Email is a Nabble idea.
27 Nov 2008 16:47
[PATCH] Added Musepack support with libmpcdec
Maxime COSTE <frrrwww <at> gmail.com>
2008-11-27 15:47:29 GMT
2008-11-27 15:47:29 GMT
Hello,
Here is a patch that add support for libmpcdec in herrie, allowing it to play
musepack files.
Tell me if I need to change anything.
Cheers,
Mawww.
---
herrie/README | 2 +
herrie/configure | 12 ++
herrie/src/audio_file.c | 3 +
herrie/src/audio_format.h | 19 ++++
herrie/src/audio_format_musepack.c | 202 ++++++++++++++++++++++++++++++++++++
5 files changed, 238 insertions(+), 0 deletions(-)
create mode 100644 herrie/src/audio_format_musepack.c
diff --git a/herrie/README b/herrie/README
index 2fd0a31..df455fd 100644
--- a/herrie/README
+++ b/herrie/README
<at> <at> -64,6 +64,7 <at> <at> Herrie:
- libsndfile (optional)
- libspiff (XSPF support, requires 1.0.0 or higher, optional)
- libvorbisfile (optional)
+- libmpcdec (optional)
- ncursesw, ncurses or pdcurses (`XCurses')
- pulseaudio (optional)
<at> <at> -85,6 +86,7 <at> <at> configure script to change certain parameters:
- no_scrobbler Disable AudioScrobbler support
- no_sndfile Disable libsndfile linkage (Wave/FLAC support)
- no_vorbis Disable Ogg Vorbis support
+- no_musepack Disable Musepack support
- no_xspf Disable XSPF (`Spiff') playlist support
- alsa Use ALSA audio output
diff --git a/herrie/configure b/herrie/configure
index f5c172c..5c0db0b 100755
--- a/herrie/configure
+++ b/herrie/configure
<at> <at> -48,6 +48,7 <at> <at> CFG_STRIP=-s
unset CFG_VOLUME
CFG_VORBIS=yes
CFG_XSPF=yes
+CFG_MUSEPACK=yes
DOIT= <at>
# Operating system defaults
<at> <at> -140,6 +141,9 <at> <at> do
no_vorbis)
unset CFG_VORBIS
;;
+ no_musepack)
+ unset CFG_MUSEPACK
+ ;;
no_xspf)
unset CFG_XSPF
;;
<at> <at> -297,6 +301,13 <at> <at> then
LDFLAGS="$LDFLAGS -lvorbisfile"
SRCS="$SRCS audio_format_vorbis"
fi
+# Musepack support
+if [ "$CFG_MUSEPACK" != "" ]
+then
+ CFLAGS="$CFLAGS -DBUILD_MUSEPACK"
+ LDFLAGS="$LDFLAGS -lmpcdec"
+ SRCS="$SRCS audio_format_musepack"
+fi
# XSPF support
if [ "$CFG_XSPF" != "" ]
then
<at> <at> -374,6 +385,7 <at> <at> echo "- Using $CFG_AO audio output"
[ "$CFG_SCROBBLER" != "" ] && echo "- Support for AudioScrobbler"
[ "$CFG_SNDFILE" != "" ] && echo "- Support for libsndfile"
[ "$CFG_VORBIS" != "" ] && echo "- Support for Ogg Vorbis"
+[ "$CFG_MUSEPACK" != "" ] && echo "- Support for Musepack"
[ "$CFG_XSPF" != "" ] && echo "- Support for XSPF (\`Spiff')"
echo
diff --git a/herrie/src/audio_file.c b/herrie/src/audio_file.c
index 5fb6ec9..9329e74 100644
--- a/herrie/src/audio_file.c
+++ b/herrie/src/audio_file.c
<at> <at> -67,6 +67,9 <at> <at> struct audio_format {
* <at> brief List of audio formats.
*/
static struct audio_format formats[] = {
+#ifdef BUILD_MUSEPACK
+ { musepack_open, musepack_close, musepack_read, musepack_seek },
+#endif /* !BUILD_MUSEPACK */
#ifdef BUILD_VORBIS
{ vorbis_open, vorbis_close, vorbis_read, vorbis_seek },
#endif /* !BUILD_VORBIS */
diff --git a/herrie/src/audio_format.h b/herrie/src/audio_format.h
index ec75eb1..49f1bf5 100644
--- a/herrie/src/audio_format.h
+++ b/herrie/src/audio_format.h
<at> <at> -105,3 +105,22 <at> <at> size_t vorbis_read(struct audio_file *fd, int16_t *buf, size_t len);
*/
void vorbis_seek(struct audio_file *fd, int len, int rel);
#endif /* BUILD_VORBIS */
+
+#ifdef BUILD_MUSEPACK
+/**
+ * <at> brief Open a Musepack file.
+ */
+int musepack_open(struct audio_file *fd, const char *ext);
+/**
+ * <at> brief Close and clean up the Musepack file.
+ */
+void musepack_close(struct audio_file* fd);
+/**
+ * <at> brief Read data from the Musepack file and place it in buf.
+ */
+size_t musepack_read(struct audio_file* fd, int16_t *buf, size_t len);
+/**
+ * <at> brief Seek a relative amount in seconds in the current file handle.
+ */
+void musepack_seek(struct audio_file* fd, int len, int rel);
+#endif /* BUILD_MUSEPACK */
diff --git a/herrie/src/audio_format_musepack.c b/herrie/src/audio_format_musepack.c
new file mode 100644
index 0000000..e3726fd
--- /dev/null
+++ b/herrie/src/audio_format_musepack.c
<at> <at> -0,0 +1,202 <at> <at>
+/*
+ * Copyright (c) 2008 Maxime COSTE <frrrwww <at> gmail.com>
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+/**
+ * <at> file audio_format_musepack.c
+ * <at> brief musepack decompression routines.
+ */
+
+#include "stdinc.h"
+
+#include <mpcdec/mpcdec.h>
+
+#include "audio_file.h"
+#include "audio_format.h"
+#include "audio_output.h"
+
+#define MPC_BUFFER_SIZE 8912*2
+
+/**
+ * <at> brief Private Musepack data stored in the audio file structure.
+ */
+struct musepack_drv_data {
+ mpc_decoder decoder;
+ mpc_reader reader;
+ mpc_streaminfo info;
+ mpc_int32_t size;
+
+ MPC_SAMPLE_FORMAT buffer[MPC_BUFFER_SIZE];
+ int buf_end;
+ int buf_pos;
+};
+
+/*
+ * Musepack reader implementation
+ */
+mpc_int32_t
+mpc_read_impl(void *data, void *ptr, mpc_int32_t size)
+{
+ struct audio_file *f = (struct audio_file *) data;
+ return fread(ptr, 1, size, f->fp);
+}
+
+mpc_bool_t
+mpc_seek_impl(void *data, mpc_int32_t offset)
+{
+ struct audio_file *f = (struct audio_file *) data;
+ return f->stream ? 0 : !fseek(f->fp, offset, SEEK_SET);
+}
+
+mpc_int32_t
+mpc_tell_impl(void *data)
+{
+ struct audio_file *f = (struct audio_file *) data;
+ return ftell(f->fp);
+}
+
+mpc_int32_t
+mpc_get_size_impl(void *data)
+{
+ struct musepack_drv_data *d = (struct musepack_drv_data *)
+ ((struct audio_file *)data)->drv_data;
+ return d->size;
+}
+
+mpc_bool_t
+mpc_canseek_impl(void *data)
+{
+ struct audio_file *f = (struct audio_file *) data;
+ return !f->stream;
+}
+
+/*
+ * Public API
+ */
+
+int
+musepack_open(struct audio_file *fd, const char *ext)
+{
+ struct musepack_drv_data *data;
+
+ data = g_slice_new(struct musepack_drv_data);
+ fd->drv_data = (void *)data;
+ data->buf_pos = 0;
+ data->buf_end = 0;
+
+ /* setup the mpc reader functions */
+ data->reader.read = mpc_read_impl;
+ data->reader.seek = mpc_seek_impl;
+ data->reader.tell = mpc_tell_impl;
+ data->reader.get_size = mpc_get_size_impl;
+ data->reader.canseek = mpc_canseek_impl;
+ data->reader.data = fd;
+
+ if (!fd->stream) {
+ fseek(fd->fp, 0, SEEK_END);
+ data->size = ftell(fd->fp);
+ fseek(fd->fp, 0, SEEK_SET);
+ } else
+ data->size = 0;
+
+ mpc_streaminfo_init(&data->info);
+ if (mpc_streaminfo_read(&data->info, &data->reader) != ERROR_CODE_OK) {
+ /* not a musepack file */
+ g_slice_free(struct musepack_drv_data, data);
+ return -1;
+ }
+
+ fd->srate = data->info.sample_freq;
+ fd->channels = data->info.channels;
+ fd->time_len = mpc_streaminfo_get_length(&data->info);
+
+ /* initialize the mpc decoder */
+ mpc_decoder_setup(&data->decoder, &data->reader);
+ if (!mpc_decoder_initialize(&data->decoder, &data->info)) {
+ g_slice_free(struct musepack_drv_data, data);
+ return -1;
+ }
+
+ return 0;
+}
+
+void
+musepack_close(struct audio_file* fd)
+{
+ struct musepack_drv_data *data = (struct musepack_drv_data *)fd->drv_data;
+ g_slice_free(struct musepack_drv_data, data);
+}
+
+#ifdef MPC_FIXED_POINT
+#define TO_INT16(x) x >> 16
+#else
+/*
+ * looks like sometimes libmpcdec returns floats slightly over 1.0f, so I do
+ * not use 0x7FFF as a scale to avoid some audio artifacts
+ */
+#define TO_INT16(x) x * (0x6FFF)
+#endif
+
+size_t
+musepack_read(struct audio_file* fd, int16_t *buf, size_t len)
+{
+ struct musepack_drv_data *data = (struct musepack_drv_data *)fd->drv_data;
+ int copied = 0;
+ size_t rlen;
+
+ /* copy already decoded data in the buffer */
+ while (data->buf_pos < data->buf_end)
+ buf[copied++] = TO_INT16(data->buffer[data->buf_pos++]);
+
+ data->buf_pos = 0;
+ data->buf_end = 0;
+
+ /* decode some new data */
+ while (data->buf_end < len - copied) {
+ rlen = mpc_decoder_decode(&data->decoder,
+ &data->buffer[data->buf_end],
+ 0, 0);
+ if (rlen <= 0)
+ break;
+ data->buf_end += rlen * fd->channels;
+ }
+
+ /* convert samples to 16 bit */
+ while (copied < len && data->buf_pos < data->buf_end)
+ buf[copied++] = TO_INT16(data->buffer[data->buf_pos++]);
+
+ return copied;
+}
+
+void
+musepack_seek(struct audio_file* fd, int len, int rel)
+{
+ struct musepack_drv_data *data = (struct musepack_drv_data *)fd->drv_data;
+ int pos = len;
+ /* not supported yet */
+ if (rel)
+ pos += 0;
+ mpc_decoder_seek_seconds(&data->decoder, pos);
+}
+
--
--
1.5.6.4
13 Nov 2008 17:35
DBUS support questions
Phillip Warner <shadowpcw <at> hotmail.com>
2008-11-13 16:35:58 GMT
2008-11-13 16:35:58 GMT
I saw that DBUS support is committed to herrie and the SIGUSR* signals are out. How do we use the DBUS support to manage herrie externally? I'd like to beta test this :)
--phil
See how Windows® connects the people, information, and fun that are part of your life Click here
--phil
See how Windows® connects the people, information, and fun that are part of your life Click here
13 Nov 2008 17:33
herrie ToDo - Help screen
Phillip Warner <shadowpcw <at> hotmail.com>
2008-11-13 16:33:23 GMT
2008-11-13 16:33:23 GMT
I noticed the ToDo has - Add some kind of small help to the application, for people that are unwilling to read the man page I was thinking of trying to implement this. The idea I have is that the user presses '?' to go to the help screen. Playback is uninterrupted. The user can press UP, DOWN, j, k, PAGEUP, PAGEDOWN to scroll or page the help as needed. Any other key exits the help screen. What do you think about this, Ed? --phil _________________________________________________________________ See how Windows® connects the people, information, and fun that are part of your life http://clk.atdmt.com/MRT/go/119463819/direct/01/
13 Nov 2008 16:57
Patch for previewing songs, defined intervals
Phillip Warner <shadowpcw <at> hotmail.com>
2008-11-13 15:57:15 GMT
2008-11-13 15:57:15 GMT
The attached patches allow you to optionally start or end every song at defined times. I find it very useful
for previewing songs or during workout intervals.
If you use any of my other patches use this one last. Use the "-orig" patch unless you use my autoquit patch.
Below is a more detailed description of what this patch adds to herrie and how to use it.
Please post a quick message to this email list if this patch has been helpful to you or if you have any comments
on it.
--phil
** StartAt **
Setting startat allows you to define the amount of seconds to skip when initially
playing a song. This can be useful, for example, when previewing a set of songs.
Often songs have an intro that you might want to skip in order to quickly get a
good feel for a song. Normally this would require that you manually skip ahead
for each song. With startat, however, you could start each song at any time you
choose.
You can define startat in two ways:
1) When calling herrie with the -t switch (sTartat)
This takes seconds only so running
herrie -t 110
would set each song to start at 110 seconds or 1:50. Digits are read until
a non-numerical character is found. If no digits are read the default (0)
is used. So,
herrie -t 12.0 would yield "12"
herrie -t 3garbage would yield "3"
herrie -t -1 would yield default "0".
2) At runtime
Use the 'J' button as if you were going to jump to a section of the song.
However, add a '$' in front of the number you enter. This number can be in
seconds, HH:MM:SS, MM:SS, or M:SS. If the number is greater than the number
of seconds in the song, the song will be skipped. After the number is
entered hit ENTER. Playback will jump to that position in the song and every
song thereafter. This can be changed as much as you desire.
** SkipAt **
Setting skipat allows you to define the maximum playback position in seconds that
you want before skipping to the next song. This can be useful when combined with
startat to preview songs for a defined amount of seconds (say listen to 15 seconds
of each song starting at 2 minutes). In addition, defining intervals can be useful
for repeated interval workouts.
You can define skipat similar to startat (see above).
1) When calling herrie with the -k switch (sKipat)
Again this takes only seconds
herrie -k 15
would skip to the next song after playback get to the 15 second mark (including
if you jump there). However,
herrie -t 120 -k 15
would start each song at 2:00 and skip at 2:15.
skipat must be at least 1 second or it is ignored.
2) At runtime
Again, similar to starat, use the 'J' button with '#' preceding your entered
values (eg. '#15' or '#1:10'). If playback for the current song is already
past the amount you entered playback will immediately skip to the next song.
If the amount you entered is 0 or greater than the amount of seconds in the
song, then the entire song will be played.
_________________________________________________________________
Windows Live Hotmail now works up to 70% faster.
http://windowslive.com/Explore/Hotmail?ocid=TXT_TAGLM_WL_hotmail_acq_faster_112008
12 Nov 2008 18:31
'Feature' request: libFLAC instead of libmodplug
Pieter Verberne <pieterverberne <at> xs4all.nl>
2008-11-12 17:31:13 GMT
2008-11-12 17:31:13 GMT
Hi, It would be cool if Herrie could use FLAC(1), instead of libmodplug for playing .flac files. OpenBSD doesn't have libmodplug ported. Only FLAC is ported. Anyone interested in developing this? I don't know how te code:-P Pieter Verberne (1) http://flac.sourceforge.net/
14 Oct 2008 18:32
Herrie 2.2
Ed Schouten <ed <at> 80386.nl>
2008-10-14 16:32:37 GMT
2008-10-14 16:32:37 GMT
Hello everyone, Sorry for the inactivity lately. I started at university a couple of months ago, which means I don't really have a lot of time to add new exciting features. This release includes the following fixes: - A Ukranian translation, which has been written by Viacheslav Chumushuk. - An option to hide all yes/no questions, always assuming `yes' is valid (gui.input.confirm). Based on a patch written by Viacheslav Chumushuk. - Support for relative pathnames in XSPF playlists. This means Herrie now requires libSpiff 1.0.0. This reduces the size of an average XSPF playlist. - Fix an XSPF playlist corruption bug, which caused the XML file to contain non-UTF-8 characters. I've worked around this issue by omitting <title/> tags when non-UTF-8 data is present. This solution is less than ideal, but it's better than writing corrupt files to disk. As usual, the checksums: | MD5 (herrie-2.2.tar.bz2) = 88832b10298ab89473730eb0c93b6ddf | SHA256 (herrie-2.2.tar.bz2) = 142341072920f86b6eb570b8f13bf5fd87c06cf801543dc7d1a819e39eb9fb2b | SIZE (herrie-2.2.tar.bz2) = 71596 | MD5 (herrie-2.2.tar.gz ) = 2ef6a6200a23843438c874f4e7500e76 | SHA256 (herrie-2.2.tar.gz ) = 1fd25f4bf20c644158403b3f385993620970e4bddfd4276e00bb1fa859bc467f | SIZE (herrie-2.2.tar.gz ) = 84843 Also some random notes: - The Dispuut Interlink mirror is no longer available. This means that package maintainers should make sure that the link to this site is no longer mentioned in scripts, etc. - The Doxygen page has also been moved to http//herrie.info/doxygen/. Have fun! -- -- Ed Schouten <ed <at> 80386.nl> WWW: http://80386.nl/
6 Oct 2008 00:24
API changes in libspiff 1.0.0
Robert Buchholz <rbu <at> gentoo.org>
2008-10-05 22:24:29 GMT
2008-10-05 22:24:29 GMT
Hi, the recent libspiff 1.0.0 update broke API, and Herrie 2.1 fails to build against it. We're tracking this as bug #240163 [ https://bugs.gentoo.org/240163 ]. I didn't find any changes to make it work in the git repo. Ed, are you able to provide those? Thanks, Robert
29 Sep 2008 01:31
libmodplug interaction wishlist request
r n jacobs <rnjacobs <at> MIT.EDU>
2008-09-28 23:31:58 GMT
2008-09-28 23:31:58 GMT
Hi fellow herrie users! There are two halves to my wishlist: one, I noticed that the modplug_open method uses case sensitive compares for the extensions, so if I have some old dos-era files that are in all caps, it refuses to play them. Two, libmodplug supports a lot more mod formats than just the 4 extensions currently there, and it would be nice if I could play the couple MTMs, MEDs, and ULTs I have. Thank you very much for your time and consideration, Robert Jacobs
11 Sep 2008 00:05
start it up - PLAY?
wishi <wishi <at> pluto.sunn.de>
2008-09-10 22:05:38 GMT
2008-09-10 22:05:38 GMT
He mates! Cool stuff you programmed out so far, good interface and I like it. But just as stupid as I am, I've ask: where's play? I mean, starting it up directly with files is working. You get audio, and fun. But consider following: % herrije You're in the interface, you use the directory browser and add songs to the playlist. b -> it doesn't start v -> same thing c -> nope Forgive if I read it over, but there seems to be no PLAY? Thanks for answers, wishi -- -- --__----____----- wishinet.blogspot.com just wishi - does Netninpo __--___-----_____ - http://www.gnu.org/philosophy/no-word-attachments.html - PGP ID: 0xCCCA5E74
RSS Feed