summaryrefslogtreecommitdiff
path: root/core
authorllornkcor <llornkcor>2002-06-26 23:50:27 (UTC)
committer llornkcor <llornkcor>2002-06-26 23:50:27 (UTC)
commita86c09e8a12b504471ffeb8966e34a79dd8518b5 (patch) (unidiff)
treebea361029616edb533136880b973dae4a7e7315e /core
parentb13d95b210c7d16229514afc66e32a1de09a075c (diff)
downloadopie-a86c09e8a12b504471ffeb8966e34a79dd8518b5.zip
opie-a86c09e8a12b504471ffeb8966e34a79dd8518b5.tar.gz
opie-a86c09e8a12b504471ffeb8966e34a79dd8518b5.tar.bz2
fixed error parsing pls where the url's already have a trailing /, and took out muting for now
Diffstat (limited to 'core') (more/less context) (ignore whitespace changes)
-rw-r--r--core/multimedia/opieplayer/audiodevice.cpp8
-rw-r--r--core/multimedia/opieplayer/playlistwidget.cpp9
2 files changed, 11 insertions, 6 deletions
diff --git a/core/multimedia/opieplayer/audiodevice.cpp b/core/multimedia/opieplayer/audiodevice.cpp
index 8f04d0d..59e06a6 100644
--- a/core/multimedia/opieplayer/audiodevice.cpp
+++ b/core/multimedia/opieplayer/audiodevice.cpp
@@ -190,13 +190,13 @@ void AudioDevice::setVolume( unsigned int leftVolume, unsigned int rightVolume,
190 190
191 191
192 192
193 193
194AudioDevice::AudioDevice( unsigned int f, unsigned int chs, unsigned int bps ) { 194AudioDevice::AudioDevice( unsigned int f, unsigned int chs, unsigned int bps ) {
195 qDebug("creating new audio device"); 195 qDebug("creating new audio device");
196 QCopEnvelope( "QPE/System", "volumeChange(bool)" ) << TRUE; 196 // QCopEnvelope( "QPE/System", "volumeChange(bool)" ) << TRUE;
197 d = new AudioDevicePrivate; 197 d = new AudioDevicePrivate;
198 d->frequency = f; 198 d->frequency = f;
199 d->channels = chs; 199 d->channels = chs;
200 d->bytesPerSample = bps; 200 d->bytesPerSample = bps;
201 qDebug("%d",bps); 201 qDebug("%d",bps);
202 int format=0; 202 int format=0;
@@ -254,31 +254,31 @@ AudioDevice::AudioDevice( unsigned int f, unsigned int chs, unsigned int bps ) {
254 //if ( chs != d->channels ) qDebug( "Wanted %d, got %d channels", chs, d->channels ); 254 //if ( chs != d->channels ) qDebug( "Wanted %d, got %d channels", chs, d->channels );
255 //if ( f != d->frequency ) qDebug( "wanted %dHz, got %dHz", f, d->frequency ); 255 //if ( f != d->frequency ) qDebug( "wanted %dHz, got %dHz", f, d->frequency );
256 //if ( capabilities & DSP_CAP_BATCH ) qDebug( "Sound card has local buffer" ); 256 //if ( capabilities & DSP_CAP_BATCH ) qDebug( "Sound card has local buffer" );
257 //if ( capabilities & DSP_CAP_REALTIME )qDebug( "Sound card has realtime sync" ); 257 //if ( capabilities & DSP_CAP_REALTIME )qDebug( "Sound card has realtime sync" );
258 //if ( capabilities & DSP_CAP_TRIGGER ) qDebug( "Sound card has precise trigger" ); 258 //if ( capabilities & DSP_CAP_TRIGGER ) qDebug( "Sound card has precise trigger" );
259 //if ( capabilities & DSP_CAP_MMAP ) qDebug( "Sound card can mmap" ); 259 //if ( capabilities & DSP_CAP_MMAP ) qDebug( "Sound card can mmap" );
260 QCopEnvelope( "QPE/System", "volumeChange(bool)" ) << FALSE; 260 // QCopEnvelope( "QPE/System", "volumeChange(bool)" ) << FALSE;
261 261
262} 262}
263 263
264 264
265AudioDevice::~AudioDevice() { 265AudioDevice::~AudioDevice() {
266 qDebug("destryo audiodevice"); 266 qDebug("destryo audiodevice");
267 QCopEnvelope( "QPE/System", "volumeChange(bool)" ) << TRUE; 267 // QCopEnvelope( "QPE/System", "volumeChange(bool)" ) << TRUE;
268 268
269// #ifdef Q_OS_WIN32 269// #ifdef Q_OS_WIN32
270// waveOutClose( (HWAVEOUT)d->handle ); 270// waveOutClose( (HWAVEOUT)d->handle );
271// #else 271// #else
272# ifndef KEEP_DEVICE_OPEN 272# ifndef KEEP_DEVICE_OPEN
273 close( d->handle ); // Now it should be safe to shut the handle 273 close( d->handle ); // Now it should be safe to shut the handle
274# endif 274# endif
275 delete d->unwrittenBuffer; 275 delete d->unwrittenBuffer;
276 delete d; 276 delete d;
277//#endif 277//#endif
278 QCopEnvelope( "QPE/System", "volumeChange(bool)" ) << FALSE; 278// QCopEnvelope( "QPE/System", "volumeChange(bool)" ) << FALSE;
279 279
280} 280}
281 281
282 282
283void AudioDevice::volumeChanged( bool muted ) 283void AudioDevice::volumeChanged( bool muted )
284{ 284{
diff --git a/core/multimedia/opieplayer/playlistwidget.cpp b/core/multimedia/opieplayer/playlistwidget.cpp
index 0332237..4926287 100644
--- a/core/multimedia/opieplayer/playlistwidget.cpp
+++ b/core/multimedia/opieplayer/playlistwidget.cpp
@@ -1335,14 +1335,19 @@ void PlayListWidget::readPls(const QString &filename) {
1335// QString name = f.baseName(); 1335// QString name = f.baseName();
1336// name = name.left(name.length()-4); 1336// name = name.left(name.length()-4);
1337// name = name.right(name.findRev("/",0,TRUE)); 1337// name = name.right(name.findRev("/",0,TRUE));
1338 lnk.setName( name); 1338 lnk.setName( name);
1339 if(s.at(s.length()-4) == '.') 1339 if(s.at(s.length()-4) == '.')
1340 lnk.setFile( s); 1340 lnk.setFile( s);
1341 else 1341 else {
1342 lnk.setFile( s+"/"); 1342 if( name.right(1).find('/') == -1)
1343 s+="/";
1344 // if(s.right(1) != '/')
1345 lnk.setFile( s);
1346
1347 }
1343 lnk.setType("audio/x-mpegurl"); 1348 lnk.setType("audio/x-mpegurl");
1344 1349
1345 qDebug("DocLnk add "+name); 1350 qDebug("DocLnk add "+name);
1346 d->selectedFiles->addToSelection( lnk); 1351 d->selectedFiles->addToSelection( lnk);
1347 } 1352 }
1348 } 1353 }