- fix automatic resampling
- disable the libsamplerate resampler, it clips and is horribly inefficient - fix WANTLIB - stop ffmpeg decoder from spamming stdout - enable jack output
This commit is contained in:
parent
5f5750a4da
commit
7203fdc58b
@ -1,8 +1,8 @@
|
|||||||
# $OpenBSD: Makefile,v 1.9 2008/03/24 05:50:05 jakemsr Exp $
|
# $OpenBSD: Makefile,v 1.10 2008/04/16 02:10:21 jakemsr Exp $
|
||||||
COMMENT= Decoding Library for KDE Multimedia
|
COMMENT= Decoding Library for KDE Multimedia
|
||||||
|
|
||||||
DISTNAME= akode-2.0.2
|
DISTNAME= akode-2.0.2
|
||||||
PKGNAME= ${DISTNAME}p2
|
PKGNAME= ${DISTNAME}p3
|
||||||
SHARED_LIBS += akode 2.1 # .2.0
|
SHARED_LIBS += akode 2.1 # .2.0
|
||||||
|
|
||||||
CATEGORIES= audio multimedia x11/kde
|
CATEGORIES= audio multimedia x11/kde
|
||||||
@ -25,9 +25,9 @@ LIB_DEPENDS= FLAC.>=8::audio/flac \
|
|||||||
vorbis,vorbisfile,vorbisenc::audio/libvorbis \
|
vorbis,vorbisfile,vorbisenc::audio/libvorbis \
|
||||||
ltdl::devel/libtool,-ltdl \
|
ltdl::devel/libtool,-ltdl \
|
||||||
avcodec.>=10,avformat.>=10,avutil.>=3::graphics/ffmpeg \
|
avcodec.>=10,avformat.>=10,avutil.>=3::graphics/ffmpeg \
|
||||||
samplerate.>=1::audio/libsamplerate
|
jack::audio/jack
|
||||||
|
|
||||||
WANTLIB= X11 Xau Xdmcp Xext a52 c faac faad m mp3lame \
|
WANTLIB= a52 c faac faad m mp3lame \
|
||||||
ogg ossaudio pthread stdc++ theora x264 z
|
ogg ossaudio pthread stdc++ theora x264 z
|
||||||
|
|
||||||
USE_X11= Yes
|
USE_X11= Yes
|
||||||
@ -40,7 +40,8 @@ CONFIGURE= /bin/sh ${WRKDIST}/admin/cvs.sh configure
|
|||||||
CONFIGURE_ENV= PTHREAD_LIBS=-pthread
|
CONFIGURE_ENV= PTHREAD_LIBS=-pthread
|
||||||
CONFIGURE_ARGS+= --with-extra-includes=${LOCALBASE}/include \
|
CONFIGURE_ARGS+= --with-extra-includes=${LOCALBASE}/include \
|
||||||
--with-extra-libs=${LOCALBASE}/lib \
|
--with-extra-libs=${LOCALBASE}/lib \
|
||||||
--without-jack \
|
--with-jack \
|
||||||
--without-polyaudio
|
--without-polyaudio \
|
||||||
|
--without-libsamplerate
|
||||||
|
|
||||||
.include <bsd.port.mk>
|
.include <bsd.port.mk>
|
||||||
|
27
audio/akode/patches/patch-akode_lib_player_cpp
Normal file
27
audio/akode/patches/patch-akode_lib_player_cpp
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
$OpenBSD: patch-akode_lib_player_cpp,v 1.1 2008/04/16 02:10:21 jakemsr Exp $
|
||||||
|
--- akode/lib/player.cpp.orig Mon Mar 24 01:59:23 2008
|
||||||
|
+++ akode/lib/player.cpp Mon Mar 24 02:54:46 2008
|
||||||
|
@@ -398,7 +398,10 @@ bool Player::load() {
|
||||||
|
if (d->sample_rate != first_frame.sample_rate) {
|
||||||
|
AKODE_DEBUG("Resampling to " << d->sample_rate);
|
||||||
|
d->resampler->setSampleRate(d->sample_rate);
|
||||||
|
- }
|
||||||
|
+ } else {
|
||||||
|
+ delete d->resampler;
|
||||||
|
+ d->resampler = 0;
|
||||||
|
+ }
|
||||||
|
int out_channels = d->sink->audioConfiguration()->channels;
|
||||||
|
int in_channels = first_frame.channels;
|
||||||
|
if (in_channels != out_channels) {
|
||||||
|
@@ -419,7 +422,10 @@ bool Player::load() {
|
||||||
|
d->converter = new Converter(out_width);
|
||||||
|
else
|
||||||
|
d->converter->setSampleWidth(out_width);
|
||||||
|
- }
|
||||||
|
+ } else {
|
||||||
|
+ delete d->converter;
|
||||||
|
+ d->converter = 0;
|
||||||
|
+ }
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
@ -1,6 +1,6 @@
|
|||||||
$OpenBSD: patch-akode_plugins_ffmpeg_decoder_ffmpeg_decoder_cpp,v 1.1 2007/10/01 17:39:50 jakemsr Exp $
|
$OpenBSD: patch-akode_plugins_ffmpeg_decoder_ffmpeg_decoder_cpp,v 1.2 2008/04/16 02:10:21 jakemsr Exp $
|
||||||
--- akode/plugins/ffmpeg_decoder/ffmpeg_decoder.cpp.orig Sun Sep 30 16:42:06 2007
|
--- akode/plugins/ffmpeg_decoder/ffmpeg_decoder.cpp.orig Thu Aug 10 11:37:20 2006
|
||||||
+++ akode/plugins/ffmpeg_decoder/ffmpeg_decoder.cpp Sun Sep 30 16:42:46 2007
|
+++ akode/plugins/ffmpeg_decoder/ffmpeg_decoder.cpp Mon Mar 24 18:14:43 2008
|
||||||
@@ -26,9 +26,11 @@
|
@@ -26,9 +26,11 @@
|
||||||
#include "decoder.h"
|
#include "decoder.h"
|
||||||
|
|
||||||
@ -13,3 +13,12 @@ $OpenBSD: patch-akode_plugins_ffmpeg_decoder_ffmpeg_decoder_cpp,v 1.1 2007/10/01
|
|||||||
|
|
||||||
#include "ffmpeg_decoder.h"
|
#include "ffmpeg_decoder.h"
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
@@ -349,7 +351,7 @@ retry:
|
||||||
|
assert(false);
|
||||||
|
}
|
||||||
|
if (length == 0) return readFrame(frame);
|
||||||
|
- std::cout << "akode: FFMPEG: Frame length: " << length << "\n";
|
||||||
|
+ // std::cout << "akode: FFMPEG: Frame length: " << length << "\n";
|
||||||
|
|
||||||
|
if( d->packetSize <= 0 )
|
||||||
|
av_free_packet( &d->packet );
|
||||||
|
@ -0,0 +1,28 @@
|
|||||||
|
$OpenBSD: patch-akode_plugins_jack_sink_jack_sink_cpp,v 1.1 2008/04/16 02:10:21 jakemsr Exp $
|
||||||
|
--- akode/plugins/jack_sink/jack_sink.cpp.orig Mon Mar 24 03:18:18 2008
|
||||||
|
+++ akode/plugins/jack_sink/jack_sink.cpp Mon Mar 24 03:54:26 2008
|
||||||
|
@@ -84,7 +84,7 @@ static int process (jack_nframes_t nframes, void *arg)
|
||||||
|
m_data->pos++;
|
||||||
|
}
|
||||||
|
|
||||||
|
- return n;
|
||||||
|
+ return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
static void shutdown (void *arg)
|
||||||
|
@@ -147,13 +147,13 @@ int JACKSink::setAudioConfiguration(const AudioConfigu
|
||||||
|
|
||||||
|
if (config->channel_config != MonoStereo ) return -1;
|
||||||
|
m_data->left_port = jack_port_register (m_data->client, "left", JACK_DEFAULT_AUDIO_TYPE, JackPortIsOutput, 0);
|
||||||
|
- if (jack_connect (m_data->client, jack_port_name (m_data->left_port), "alsa_pcm:playback_1")) {
|
||||||
|
+ if (jack_connect (m_data->client, jack_port_name (m_data->left_port), "system:playback_1")) {
|
||||||
|
m_data->error = true;
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
if (config->channels > 1) {
|
||||||
|
m_data->right_port = jack_port_register (m_data->client, "right", JACK_DEFAULT_AUDIO_TYPE, JackPortIsOutput, 0);
|
||||||
|
- if (jack_connect (m_data->client, jack_port_name (m_data->right_port), "alsa_pcm:playback_2")) {
|
||||||
|
+ if (jack_connect (m_data->client, jack_port_name (m_data->right_port), "system:playback_2")) {
|
||||||
|
m_data->config.channels = 1;
|
||||||
|
res = 1;
|
||||||
|
}
|
@ -1,9 +1,9 @@
|
|||||||
@comment $OpenBSD: PFRAG.shared,v 1.2 2007/10/01 17:39:50 jakemsr Exp $
|
@comment $OpenBSD: PFRAG.shared,v 1.3 2008/04/16 02:10:21 jakemsr Exp $
|
||||||
@lib lib/libakode.so.${LIBakode_VERSION}
|
@lib lib/libakode.so.${LIBakode_VERSION}
|
||||||
lib/libakode_ffmpeg_decoder.so
|
lib/libakode_ffmpeg_decoder.so
|
||||||
|
lib/libakode_jack_sink.so
|
||||||
lib/libakode_mpc_decoder.so
|
lib/libakode_mpc_decoder.so
|
||||||
lib/libakode_mpeg_decoder.so
|
lib/libakode_mpeg_decoder.so
|
||||||
lib/libakode_oss_sink.so
|
lib/libakode_oss_sink.so
|
||||||
lib/libakode_src_resampler.so
|
|
||||||
lib/libakode_sun_sink.so
|
lib/libakode_sun_sink.so
|
||||||
lib/libakode_xiph_decoder.so
|
lib/libakode_xiph_decoder.so
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
@comment $OpenBSD: PLIST,v 1.3 2007/10/01 17:39:50 jakemsr Exp $
|
@comment $OpenBSD: PLIST,v 1.4 2008/04/16 02:10:21 jakemsr Exp $
|
||||||
%%SHARED%%
|
%%SHARED%%
|
||||||
bin/akode-config
|
bin/akode-config
|
||||||
bin/akodeplay
|
bin/akodeplay
|
||||||
@ -32,14 +32,14 @@ lib/libakode.a
|
|||||||
lib/libakode.la
|
lib/libakode.la
|
||||||
@comment lib/libakode_ffmpeg_decoder.a
|
@comment lib/libakode_ffmpeg_decoder.a
|
||||||
@comment lib/libakode_ffmpeg_decoder.la
|
@comment lib/libakode_ffmpeg_decoder.la
|
||||||
|
@comment lib/libakode_jack_sink.a
|
||||||
|
@comment lib/libakode_jack_sink.la
|
||||||
@comment lib/libakode_mpc_decoder.a
|
@comment lib/libakode_mpc_decoder.a
|
||||||
@comment lib/libakode_mpc_decoder.la
|
@comment lib/libakode_mpc_decoder.la
|
||||||
@comment lib/libakode_mpeg_decoder.a
|
@comment lib/libakode_mpeg_decoder.a
|
||||||
@comment lib/libakode_mpeg_decoder.la
|
@comment lib/libakode_mpeg_decoder.la
|
||||||
@comment lib/libakode_oss_sink.a
|
@comment lib/libakode_oss_sink.a
|
||||||
@comment lib/libakode_oss_sink.la
|
@comment lib/libakode_oss_sink.la
|
||||||
@comment lib/libakode_src_resampler.a
|
|
||||||
@comment lib/libakode_src_resampler.la
|
|
||||||
@comment lib/libakode_sun_sink.a
|
@comment lib/libakode_sun_sink.a
|
||||||
@comment lib/libakode_sun_sink.la
|
@comment lib/libakode_sun_sink.la
|
||||||
@comment lib/libakode_xiph_decoder.a
|
@comment lib/libakode_xiph_decoder.a
|
||||||
|
Loading…
Reference in New Issue
Block a user