There are alot of looping sounds using the sampler chunk for loop start\end data.
Most of these sounds are somewhat "pure tone" where you can hear a noticable and very loud POP noise when they are looped improperly and there's a ~2-4 sample gap between "restarting" the looping sound.
Examples of sounds exhibiting popping are most of the "hum" sounds in AmbModern and some deep low hum like wind noises from AmbOutside.
Can this be fixed possibly? Or is this a OpenALSoft issue?
Information on this chunk can be found here:
[url]http://www.piclist.com/techref/io/serial/midi/wave.html[/url]
(CTRL+F Sampler Chunk)
For direct access use https://forums.oldunreal.com
It's been quite a while since oldunreal had an overhaul, but we are moving to another server which require some updates and changes. The biggest change is the migration of our old reliable YaBB forum to phpBB. This system expects you to login with your username and old password known from YaBB.
If you experience any problems there is also the usual "password forgotten" function. Don't forget to clear your browser cache!
If you have any further concerns feel free to contact me: Smirftsch@oldunreal.com
It's been quite a while since oldunreal had an overhaul, but we are moving to another server which require some updates and changes. The biggest change is the migration of our old reliable YaBB forum to phpBB. This system expects you to login with your username and old password known from YaBB.
If you experience any problems there is also the usual "password forgotten" function. Don't forget to clear your browser cache!
If you have any further concerns feel free to contact me: Smirftsch@oldunreal.com
[ALAudio] - Looping sounds aren't quite handled properly.
- スマイル・ドラゴン
- OldUnreal Member
- Posts: 1263
- Joined: Sun Feb 10, 2008 9:07 pm
[ALAudio] - Looping sounds aren't quite handled properly.
I am the dragon without a name.
Ðàrk-_¦_-Ñïght.: / κυνικός Δράκων / スマイル・ドラゴン / Draco Nihil
Ðàrk-_¦_-Ñïght.: / κυνικός Δράκων / スマイル・ドラゴン / Draco Nihil
- Smirftsch
- Administrator
- Posts: 8999
- Joined: Wed Apr 29, 1998 10:00 pm
- Location: NaPali
- Contact:
Re: [ALAudio] - Looping sounds aren't quite handled properly.
It's a while ago, but not THAT long ago, I've been working on this and also changed/fixed some stuff with looping already, I assumed all trouble with loops to be fixed. Annoying part is that I already forgot some of the details about it again
Here is what I use right now for loop point detection:
The update is done during ::Update function, so this is only as accurate as this function is called (tick), so this perhaps already is enough for the problem described, but this is only one idea I have right now.
Here is what I use right now for loop point detection:
Code: Select all
bool GetSampleLoop( const BYTE* Data, const BYTE* DataEnd, INT* LoopStart, INT* LoopEnd )
{
// Find looping points.
FWaveFileHeader* FileHead = (FWaveFileHeader*)Data;
if( appStrcmp(FileHead->GetIDStr(),TEXT("RIFF")) )
{
debugf(NAME_DevSound, TEXT("No RIFF in '%s'"), FileHead->GetIDStr());
return false; // Not a wave format.
}
DataEnd = Min(DataEnd,Data+FileHead->ChunkSize+sizeof(WaveChunkHeader));
Data+=sizeof(FWaveFileHeader);
WaveChunkHeader* FileFormatHead = (WaveChunkHeader*)Data;
if( appStrcmp(FileFormatHead->GetIDStr(),TEXT("fmt ")) )
{
debugf(NAME_DevSound, TEXT("Audio invalid format '%s'"), FileFormatHead->GetIDStr());
return false; // Not a wave format.
}
Data+=sizeof(WaveChunkHeader);
//FFormatChunkData* FormatData = (FFormatChunkData*)Data;
Data+=FileFormatHead->ChunkSize;
DataEnd-=(sizeof(WaveChunkHeader)-1);
// Parse until end of file or until we find sampler chunk.
while( DataChunkID[0] || DataHead->ChunkID[0]>127 ) // Faulty format?
{
++Data;
DataHead = (WaveChunkHeader*)Data;
if( !DataHead->ChunkID[0] || DataHead->ChunkID[0]>127 )
break;
}
if( !appStrcmp(DataHead->GetIDStr(),TEXT("smpl")) )
{
Data+=sizeof(WaveChunkHeader);
SamplerChunkData* Smpl = (SamplerChunkData*)Data;
if( Smpl->NumSampleLoops )
{
Data+=sizeof(SamplerChunkData);
FSamplerLoop* Loop = (FSamplerLoop*)Data;
if( LoopStart )
*LoopStart = Loop->Start;
if( LoopEnd )
*LoopEnd = Loop->End;
return true;
}
break;
}
else Data+=sizeof(WaveChunkHeader)+DataHead->ChunkSize;
}
return false;
}
Last edited by Smirftsch on Mon Jun 27, 2016 7:20 am, edited 1 time in total.
Sometimes you have to lose a fight to win the war.
- スマイル・ドラゴン
- OldUnreal Member
- Posts: 1263
- Joined: Sun Feb 10, 2008 9:07 pm
Re: [ALAudio] - Looping sounds aren't quite handled properly.
I think that may be the problem then, execution rate\tickrate causing popping noises. I wonder how Galaxy handled this or maybe if OpenALSoft can natively handle such a thing if a patch got submitted?
I am the dragon without a name.
Ðàrk-_¦_-Ñïght.: / κυνικός Δράκων / スマイル・ドラゴン / Draco Nihil
Ðàrk-_¦_-Ñïght.: / κυνικός Δράκων / スマイル・ドラゴン / Draco Nihil