mirror of
https://github.com/libretro/scummvm.git
synced 2025-01-22 18:37:01 +00:00
Formatting
svn-id: r35701
This commit is contained in:
parent
b2d7ae871b
commit
f0c6bfc392
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user