Package: lastfm
Version: 1.1.90-4
Severity: normal
Tags: patch
lists the number of sound cards less one for alsa in the drop down of sound
cards available, but even if the config
file is edited by hand it the code doesnt use the value and defaults to card #1
in ALSA.
-- System Information:
Debian Release: testing/unstable
APT prefers testing
APT policy: (500, 'testing'), (500, 'stable')
Architecture: i386 (i686)
Shell: /bin/sh linked to /bin/bash
Kernel: Linux 2.6.15-1-k7
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968)
Versions of packages lastfm depends on:
ii libasound2 1.0.11-3 ALSA library
ii libc6 2.3.6-7 GNU C Library: Shared libraries
ii libgcc1 1:4.1.0-1+b1 GCC support library
ii libqt4-core 4.1.1-1+b1 Qt 4 core non-GUI functionality ru
ii libqt4-gui 4.1.1-1+b1 Qt 4 core GUI functionality runtim
ii libsamplerate0 0.1.2-2 audio rate conversion library
ii libstdc++6 4.1.0-1+b1 The GNU Standard C++ Library v3
ii libx11-6 6.9.0.dfsg.1-6 X Window System protocol client li
Versions of packages lastfm recommends:
ii epiphany-browser [www-b 1.8.3-4 Intuitive GNOME web browser
ii galeon [www-browser] 2.0.1-3 GNOME web browser for advanced use
ii konqueror [www-browser] 4:3.5.2-2+b1 KDE's advanced file manager, web b
ii links [www-browser] 0.99+1.00pre12-1 Character mode WWW browser
ii mozilla-browser [www-br 2:1.7.12-1.1 The Mozilla Internet application s
-- no debconf information
diff -Naur stock/lastfm-1.1.90/src/playback.cpp lastfm-1.1.90/src/playback.cpp
--- stock/lastfm-1.1.90/src/playback.cpp 2006-05-13 01:15:54.000000000 +1000
+++ lastfm-1.1.90/src/playback.cpp 2006-05-07 00:18:14.131702192 +1000
@@ -287,6 +287,7 @@
int nBuffers = 8;
int bufferSize = 512;
int sampleRate = -1;
+ int soundcard = 0;
try
{
RtAudio::RtAudioApi api = RtAudio::UNSPECIFIED;
@@ -305,15 +306,18 @@
api = RtAudio::LINUX_OSS;
break;
}
+ // not sure if this code works outside linuxland - [EMAIL PROTECTED]
+ soundcard = Settings::instance()->soundCard();
#endif
int delta = 1;
#ifdef WIN32
delta = 2;
#endif
+ qDebug() << "Soundcard number: " << soundcard;
m_audio = new RtAudio();
- RtAudioDeviceInfo info = m_audio->getDeviceInfo( Settings::instance()->soundCard() + delta );
+ RtAudioDeviceInfo info = m_audio->getDeviceInfo( soundcard + delta );
if ( info.nativeFormats & RTAUDIO_SINT32 )
format = RTAUDIO_SINT32;
if ( info.nativeFormats & RTAUDIO_SINT24 )
@@ -328,9 +332,11 @@
}
delete m_audio;
- m_audio = new RtAudio( Settings::instance()->soundCard(), channels, 0, 0, format,
+ m_audio = new RtAudio( soundcard + delta, channels, 0, 0, format,
sampleRate, &bufferSize, nBuffers, api );
+ qDebug() << "Samplerate: " << sampleRate;
+
if ( (double)sampleRate / 44100.0 != 1.0 )
{
int error;
@@ -340,6 +346,7 @@
src_data.input_frames = 0;
src_data.output_frames = 0;
src_data.src_ratio = (double)sampleRate / 44100.0;
+ qDebug() << "..using sample rate conversion from 44100 of " << src_data.src_ratio;
}
}
catch ( RtError &error )
diff -Naur stock/lastfm-1.1.90/src/settingsdialog.cpp lastfm-1.1.90/src/settingsdialog.cpp
--- stock/lastfm-1.1.90/src/settingsdialog.cpp 2006-05-13 01:15:54.000000000 +1000
+++ lastfm-1.1.90/src/settingsdialog.cpp 2006-05-06 23:14:13.832058872 +1000
@@ -55,15 +55,13 @@
{
RtAudio *audio = new RtAudio();
- for ( int i = 1; i < audio->getDeviceCount(); i++ )
+ for ( int i = 1; i <= audio->getDeviceCount(); i++ )
{
RtAudioDeviceInfo info;
info = audio->getDeviceInfo( i );
QString name = QString::fromStdString( info.name );
- #ifdef WIN32
- if ( i > 1 )
- #endif
+ if ( i > 0 )
ui_system.cardBox->addItem( name );
}
@@ -74,9 +72,6 @@
error.printMessage();
}
- if ( ui_system.cardBox->count() == 0 )
- ui_system.cardBox->addItem( "Default Card" );
-
#ifdef Q_WS_X11
ui_system.systemBox->addItem( "ALSA" );
ui_system.systemBox->addItem( "OSS" );