- Fixed spurious warnings on 32-bit VC++ debug builds.
- Made the subsong (order) number a proper parameter to MusInfo::Play() instead of requiring a separate SetPosition() call to do it. SVN r1104 (trunk)
This commit is contained in:
parent
8d3e67ac88
commit
9f21b22cc5
16 changed files with 133 additions and 93 deletions
|
|
@ -1,12 +1,16 @@
|
|||
#include "i_musicinterns.h"
|
||||
|
||||
void StreamSong::Play (bool looping)
|
||||
void StreamSong::Play (bool looping, int subsong)
|
||||
{
|
||||
m_Status = STATE_Stopped;
|
||||
m_Looping = looping;
|
||||
|
||||
if (m_Stream->Play (m_Looping, 1))
|
||||
{
|
||||
if (subsong != 0)
|
||||
{
|
||||
m_Stream->SetOrder (subsong);
|
||||
}
|
||||
m_Status = STATE_Playing;
|
||||
}
|
||||
}
|
||||
|
|
@ -70,14 +74,25 @@ bool StreamSong::IsPlaying ()
|
|||
//
|
||||
// StreamSong :: SetPosition
|
||||
//
|
||||
// Sets the current order number for a MOD-type song, or the position in ms
|
||||
// for anything else.
|
||||
// Sets the position in ms.
|
||||
|
||||
bool StreamSong::SetPosition(int order)
|
||||
bool StreamSong::SetPosition(unsigned int pos)
|
||||
{
|
||||
if (m_Stream != NULL)
|
||||
{
|
||||
return m_Stream->SetPosition(order);
|
||||
return m_Stream->SetPosition(pos);
|
||||
}
|
||||
else
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
bool StreamSong::SetSubsong(int subsong)
|
||||
{
|
||||
if (m_Stream != NULL)
|
||||
{
|
||||
return m_Stream->SetOrder(subsong);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue