Formatting

svn-id: r35701
This commit is contained in:
Eugene Sandulenko 2009-01-03 14:05:57 +00:00
parent b2d7ae871b
commit f0c6bfc392

View File

@ -41,13 +41,17 @@ static bool g_useChorus = true;
*/
AgiSound *AgiSound::createFromRawResource(uint8 *data, uint32 len, int resnum, SoundMgr &manager) {
if (data == NULL || len < 2) return NULL; // Check for too small resource or no resource at all
if (data == NULL || len < 2) // Check for too small resource or no resource at all
return NULL;
uint16 type = READ_LE_UINT16(data);
switch (type) { // Create a sound object based on the type
case AGI_SOUND_SAMPLE : return new IIgsSample(data, len, resnum, manager);
case AGI_SOUND_MIDI : return new IIgsMidi (data, len, resnum, manager);
case AGI_SOUND_4CHN : return new PCjrSound (data, len, resnum, manager);
case AGI_SOUND_SAMPLE:
return new IIgsSample(data, len, resnum, manager);
case AGI_SOUND_MIDI:
return new IIgsMidi (data, len, resnum, manager);
case AGI_SOUND_4CHN:
return new PCjrSound (data, len, resnum, manager);
}
warning("Sound resource (%d) has unknown type (0x%04x). Not using the sound", resnum, type);