Hi,
Playing around with this - I can get it to make 1 sound from a memblock but not 2, if I do that, the second sound just plays the first one - weird! Anyway, the code explains it a bit better:
void DarkSDK (void)
{
dbSyncOn();
dbSyncRate(0);
int sound_start = 1;
int sound_end = 2;
// load sounds
dbLoadSound("C:\temp\sound1.wav",1);
dbLoadSound("C:\temp\sound2.wav",2);
// convert to memblocks
for (int i=sound_start;i<=sound_end;i++)
{
dbMakeMemblockFromSound(i,i);
}
// delete sounds
for (int i=sound_start;i<=sound_end;i++)
{
dbDeleteSound(i);
}
// make sounds from memblocks
for (int i=sound_start;i<=sound_end;i++)
{
dbMakeSoundFromMemblock(i,i);
}
while (LoopSDK())
{
for (int i=1;i<=10;i++)
{
dbText(10,i*10,dbStr(i));
dbText(130,i*10,dbStr(dbSoundExist(i)));
}
if (dbSpaceKey()) { dbPlaySound(1); }
if (dbReturnKey()) { dbPlaySound(2); }
if (dbEscapeKey())
{
break;
}
dbSync();
}
}
Any ideas? ..or if you can just confirm its not just my system that would be cool.
Ps. for the test I'm using 1411-kbps 16-bit 2-channel 44-kHz PCM .wav files.
Cheers