void ymMusicSeek(YMMUSIC *_pMus, ymu32 timeInMs)
{
	CYmMusic *pMusic = (CYmMusic*)_pMus;
	if (pMusic->isSeekable())
	{
		pMusic->setMusicTime(timeInMs);
	}
}
Example #2
0
unsigned int	ymMusicGetPos(YMMUSIC *_pMus)
{
    CYmMusic *pMusic = (CYmMusic*)_pMus;
    if (!pMusic->isSeekable())
        return 0;

    return pMusic->getPos();
}
void ymMusicGetInfo(YMMUSIC *_pMus, ymMusicInfo_t *pInfo)
{
	CYmMusic *pMusic = (CYmMusic*)_pMus;
	pMusic->getMusicInfo(pInfo);
}
int ymMusicGetRegister(YMMUSIC *_pMus, ymint reg)
{
	CYmMusic *pMusic = (CYmMusic*)_pMus;
	return pMusic->readYmRegister(reg);
}
const char * ymMusicGetLastError(YMMUSIC *_pMus)
{
	CYmMusic *pMusic = (CYmMusic*)_pMus;
	return pMusic->getLastError();
}
void ymMusicSetLoopMode(YMMUSIC *_pMus, ymbool bLoop)
{
	CYmMusic *pMusic = (CYmMusic*)_pMus;
	pMusic->setLoopMode(bLoop);
}
ymbool ymMusicCompute(YMMUSIC *_pMus, ymsample *pBuffer, int nbSample)
{
	CYmMusic *pMusic = (CYmMusic*)_pMus;
	return pMusic->update(pBuffer,nbSample);
}
ymbool ymMusicLoadMemory(YMMUSIC *pMus, void *pBlock, ymu32 size)
{
	CYmMusic *pMusic = (CYmMusic*)pMus;
	return pMusic->loadMemory(pBlock,size);
}
void ymMusicStop(YMMUSIC *_pMus)
{
	CYmMusic *pMusic = (CYmMusic*)_pMus;
	pMusic->stop();
}
void ymMusicSetLowpassFiler(YMMUSIC *_pMus, ymbool bActive)
{
	CYmMusic *pMusic = (CYmMusic*)_pMus;
	pMusic->setLowpassFilter(bActive);
}
void ymMusicRestart(YMMUSIC *_pMus)
{
	CYmMusic *pMusic = (CYmMusic*)_pMus;
	pMusic->restart();
}
ymu32 ymMusicGetPos(YMMUSIC *_pMus)
{
	CYmMusic *pMusic = (CYmMusic*)_pMus;
	return pMusic->getPos();
}
ymbool ymMusicIsSeekable(YMMUSIC *_pMus)
{
	CYmMusic *pMusic = (CYmMusic*)_pMus;
	return pMusic->isSeekable() ? YMTRUE : YMFALSE;
}
ymbool ymMusicIsOver(YMMUSIC *_pMus)
{
	CYmMusic *pMusic = (CYmMusic*)_pMus;
	return (pMusic->getMusicOver());
}
void ymMusicPlay(YMMUSIC *_pMus)
{
	CYmMusic *pMusic = (CYmMusic*)_pMus;
	pMusic->play();
}
void ymMusicPause(YMMUSIC *_pMus)
{
	CYmMusic *pMusic = (CYmMusic*)_pMus;
	pMusic->pause();
}
ymbool ymMusicLoad(YMMUSIC *pMus, const char *fName)
{
	CYmMusic *pMusic = (CYmMusic*)pMus;
	return pMusic->load(fName);
}