示例#1
0
        public override Buffer GetSound(uint index)
        {
            switch (SoundDataUsage)
            {
            case DataUsage.ForceAmiga:
                if (!amigaSoundOk)
                {
                    throw new ExceptionFreeserf(ErrorSystemType.Data, "Amiga sound data not available.");
                }
                return(amiga.GetSound(index));

            case DataUsage.ForceDos:
                if (!dosOk)
                {
                    throw new ExceptionFreeserf(ErrorSystemType.Data, "DOS sound data not available.");
                }
                return(dos.GetSound(index));

            case DataUsage.PreferAmiga:
                if (amigaSoundOk)
                {
                    return(amiga.GetSound(index));
                }
                else
                {
                    return(dos.GetSound(index));
                }

            case DataUsage.PreferDos:
            default:
                if (dosOk)
                {
                    return(dos.GetSound(index));
                }
                else
                {
                    return(amiga.GetSound(index));
                }
            }
        }