Address -Wall warnings

VideoWindow::ExposeEvent wasn't being used correctly; it should be a
TQCustomEvent (although, the 3000 type is already being used for
forwarding XINE_PROGRESS_EVENT).

While the pts_per_smpls part never seemed to be encountered, it would
have resulted in a floating point exception as it's always 0.  Commented
out to leave a hint as to what the code should be doing.

Resolves: TDE/codeine#2
Signed-off-by: mio <stigma@disroot.org>
pull/22/head
mio 2 months ago
parent c0311bdfc3
commit 9ef39acd5d

@ -175,8 +175,8 @@ void FHT::power2(float *p)
*p = (*p * *p), *p += *p, p++;
for (i = 1, q = p + m_num - 2; i < (m_num / 2); i++, --q)
*p++ = (*p * *p) + (*q * *q);
for (i = 1, q = p + m_num - 2; i < (m_num / 2); i++, --q, p++)
*p = (*p * *p) + (*q * *q);
}

@ -706,13 +706,19 @@ action( const char *name )
TDEActionCollection *actionCollection = nullptr;
TDEAction *action = nullptr;
if( mainWindow = (MainWindow*)kapp->mainWidget() )
if( actionCollection = mainWindow->actionCollection() )
action = actionCollection->action( name );
mainWindow = dynamic_cast<MainWindow *>(kapp->mainWidget());
if (mainWindow)
{
actionCollection = mainWindow->actionCollection();
if (actionCollection)
{
action = actionCollection->action(name);
}
}
Q_ASSERT( mainWindow );
Q_ASSERT( actionCollection );
Q_ASSERT( action );
Q_ASSERT(mainWindow);
Q_ASSERT(actionCollection);
Q_ASSERT(action);
return action;
}

@ -120,6 +120,8 @@ MainWindow::engineStateChanged( Engine::State state )
case Engine::Paused:
m_positionSlider->setEnabled( TheStream::canSeek() );
break;
default:
break;
}
@ -160,6 +162,8 @@ MainWindow::engineStateChanged( Engine::State state )
case Engine::TrackEnded:
m_titleLabel->setText( TheStream::prettyTitle() );
break;
default:
break;
}
@ -187,6 +191,8 @@ MainWindow::engineStateChanged( Engine::State state )
case Engine::Playing:
toolBar()->hide();
break;
default:
break;
}
}
}

@ -226,11 +226,6 @@ VideoWindow::event( TQEvent *e )
stop();
return false;
case VideoWindow::ExposeEvent:
//see VideoWindow::x11Event()
return true;
// Xlib.h sucks fucking balls!!!!11!!1!
#undef KeyPress
case TQEvent::KeyPress: {

@ -615,7 +615,7 @@ VideoWindow::scope()
//prune the buffer list and update the m_current_vpts timestamp
timerEvent( nullptr );
const int64_t pts_per_smpls = 0; //scope_plugin_pts_per_smpls( m_scope );
// const int64_t pts_per_smpls = 0; //scope_plugin_pts_per_smpls( m_scope );
for( int channels = xine_get_stream_info( m_stream, XINE_STREAM_INFO_AUDIO_CHANNELS ), frame = 0; frame < SCOPE_SIZE; )
{
MyNode *best_node = nullptr;
@ -631,7 +631,7 @@ VideoWindow::scope()
diff = m_current_vpts;
diff -= best_node->vpts;
diff *= 1<<16;
diff /= pts_per_smpls;
// diff /= pts_per_smpls;
const int16_t*
data16 = best_node->mem;

@ -136,8 +136,6 @@ namespace Codeine
void becomePreferredSize();
TQImage captureFrame() const;
enum { ExposeEvent = 3000 };
public slots:
void resetZoom();

Loading…
Cancel
Save