コード例 #1
0
ファイル: BASS_PLUGINFORM.cs プロジェクト: safawu/project2006
 public BASS_PLUGINFORM(string Name, string Extensions, BASSChannelType ChannelType)
 {
     name = string.Empty;
     exts = string.Empty;
     ctype = ChannelType;
     name = Name;
     exts = Extensions;
 }
コード例 #2
0
 public BASS_PLUGINFORM(string Name, string Extensions, BASSChannelType ChannelType)
 {
     name  = string.Empty;
     exts  = string.Empty;
     ctype = ChannelType;
     name  = Name;
     exts  = Extensions;
 }
コード例 #3
0
ファイル: BassWrapper.cs プロジェクト: ValeraGin/SimplePlayer
 public BASS_PLUGINFORM(string Name, string Extensions, BASSChannelType ChannelType)
 {
     this.ctype = 0;
     this.name  = string.Empty;
     this.exts  = string.Empty;
     this.ctype = (int)ChannelType;
     this.name  = Name;
     this.exts  = Extensions;
 }
コード例 #4
0
 /// <summary>
 /// Transforms <see cref="Un4seen.Bass.BASSChannelType"/> value to <see cref="Dartware.NRadio.Format"/> value.
 /// </summary>
 /// <param name="channelType"><see cref="Un4seen.Bass.BASSChannelType"/> value.</param>
 /// <returns><see cref="Dartware.NRadio.Format"/> value.</returns>
 internal static Format ToFormat(this BASSChannelType channelType)
 {
     return(channelType switch
     {
         BASSChannelType.BASS_CTYPE_MUSIC_MO3 => Format.MO3,
         BASSChannelType.BASS_CTYPE_STREAM_OGG => Format.OGG,
         BASSChannelType.BASS_CTYPE_STREAM_MP1 => Format.MP1,
         BASSChannelType.BASS_CTYPE_STREAM_MP2 => Format.MP2,
         BASSChannelType.BASS_CTYPE_STREAM_MP3 => Format.MP3,
         BASSChannelType.BASS_CTYPE_STREAM_AIFF => Format.AIFF,
         BASSChannelType.BASS_CTYPE_STREAM_CA => Format.CoreAudio,
         BASSChannelType.BASS_CTYPE_STREAM_MF => Format.AAC,
         BASSChannelType.BASS_CTYPE_STREAM_CD => Format.CDA,
         BASSChannelType.BASS_CTYPE_STREAM_WMA => Format.WMA,
         BASSChannelType.BASS_CTYPE_STREAM_OFR => Format.OFR,
         BASSChannelType.BASS_CTYPE_STREAM_APE => Format.APE,
         BASSChannelType.BASS_CTYPE_STREAM_FLAC => Format.FLAC,
         BASSChannelType.BASS_CTYPE_STREAM_MPC => Format.MPC,
         BASSChannelType.BASS_CTYPE_STREAM_AAC => Format.AAC,
         BASSChannelType.BASS_CTYPE_STREAM_MP4 => Format.MP4,
         BASSChannelType.BASS_CTYPE_STREAM_SPX => Format.SPX,
         BASSChannelType.BASS_CTYPE_STREAM_MIDI => Format.MIDI,
         BASSChannelType.BASS_CTYPE_STREAM_ALAC => Format.ALAC,
         BASSChannelType.BASS_CTYPE_STREAM_TTA => Format.TTA,
         BASSChannelType.BASS_CTYPE_STREAM_AC3 => Format.AC3,
         BASSChannelType.BASS_CTYPE_STREAM_OPUS => Format.OPUS,
         BASSChannelType.BASS_CTYPE_STREAM_ADX => Format.ADX,
         BASSChannelType.BASS_CTYPE_STREAM_AIX => Format.AIX,
         BASSChannelType.BASS_CTYPE_MUSIC_MOD => Format.MOD,
         BASSChannelType.BASS_CTYPE_MUSIC_MTM => Format.MTM,
         BASSChannelType.BASS_CTYPE_MUSIC_S3M => Format.S3M,
         BASSChannelType.BASS_CTYPE_MUSIC_XM => Format.XM,
         BASSChannelType.BASS_CTYPE_MUSIC_IT => Format.IT,
         BASSChannelType.BASS_CTYPE_STREAM_WAV => Format.WAV,
         BASSChannelType.BASS_CTYPE_STREAM_WAV_PCM => Format.WAV,
         BASSChannelType.BASS_CTYPE_STREAM_WAV_FLOAT => Format.WAV,
         BASSChannelType.BASS_CTYPE_SAMPLE => Format.Unknown,
         BASSChannelType.BASS_CTYPE_STREAM => Format.Unknown,
         BASSChannelType.BASS_CTYPE_RECORD => Format.Unknown,
         _ => Format.Unknown,
     });
コード例 #5
0
ファイル: Utils.cs プロジェクト: safawu/project2006
        public static string BASSChannelTypeToString(BASSChannelType ctype)
        {
            string str = "???";
            if ((ctype & BASSChannelType.BASS_CTYPE_STREAM_WAV) > BASSChannelType.BASS_CTYPE_UNKNOWN)
            {
                ctype = BASSChannelType.BASS_CTYPE_STREAM_WAV;
            }
            BASSChannelType type = ctype;
            if (type <= BASSChannelType.BASS_CTYPE_STREAM_FLAC)
            {
                if (type <= BASSChannelType.BASS_CTYPE_STREAM_CD)
                {
                    if (type <= BASSChannelType.BASS_CTYPE_MUSIC_MO3)
                    {
                        switch (type)
                        {
                            case BASSChannelType.BASS_CTYPE_SAMPLE:
                                return "sample";

                            case BASSChannelType.BASS_CTYPE_RECORD:
                                return "recording";

                            case BASSChannelType.BASS_CTYPE_MUSIC_MO3:
                                return "MO3";
                        }
                        return str;
                    }
                    switch (type)
                    {
                        case BASSChannelType.BASS_CTYPE_STREAM:
                            return "custom stream";

                        case (BASSChannelType.BASS_CTYPE_STREAM | BASSChannelType.BASS_CTYPE_SAMPLE):
                            return str;

                        case BASSChannelType.BASS_CTYPE_STREAM_OGG:
                            return "OGG";

                        case BASSChannelType.BASS_CTYPE_STREAM_MP1:
                            return "MP1";

                        case BASSChannelType.BASS_CTYPE_STREAM_MP2:
                            return "MP2";

                        case BASSChannelType.BASS_CTYPE_STREAM_MP3:
                            return "MP3";

                        case BASSChannelType.BASS_CTYPE_STREAM_AIFF:
                            return "AIFF";

                        case BASSChannelType.BASS_CTYPE_STREAM_CD:
                            return "CDA";
                    }
                    return str;
                }
                if (type <= BASSChannelType.BASS_CTYPE_STREAM_WV_LH)
                {
                    switch (type)
                    {
                        case BASSChannelType.BASS_CTYPE_STREAM_WMA:
                            return "WMA";

                        case BASSChannelType.BASS_CTYPE_STREAM_WMA_MP3:
                            return "MP3";

                        case BASSChannelType.BASS_CTYPE_STREAM_WV:
                            return "Wavpack";

                        case BASSChannelType.BASS_CTYPE_STREAM_WV_H:
                            return "Wavpack";

                        case BASSChannelType.BASS_CTYPE_STREAM_WV_L:
                            return "Wavpack";

                        case BASSChannelType.BASS_CTYPE_STREAM_WV_LH:
                            return "Wavpack";
                    }
                    return str;
                }
                switch (type)
                {
                    case BASSChannelType.BASS_CTYPE_STREAM_OFR:
                        return "Optimfrog";

                    case BASSChannelType.BASS_CTYPE_STREAM_APE:
                        return "APE";

                    case BASSChannelType.BASS_CTYPE_STREAM_FLAC:
                        return "FLAC";
                }
                return str;
            }
            if (type <= BASSChannelType.BASS_CTYPE_STREAM_ALAC)
            {
                if (type <= BASSChannelType.BASS_CTYPE_STREAM_MP4)
                {
                    switch (type)
                    {
                        case BASSChannelType.BASS_CTYPE_STREAM_AAC:
                            return "AAC";

                        case BASSChannelType.BASS_CTYPE_STREAM_MP4:
                            return "MP4";

                        case BASSChannelType.BASS_CTYPE_STREAM_MPC:
                            return "MPC";
                    }
                    return str;
                }
                switch (type)
                {
                    case BASSChannelType.BASS_CTYPE_STREAM_SPX:
                        return "Speex";

                    case BASSChannelType.BASS_CTYPE_STREAM_MIDI:
                        return "MIDI";

                    case BASSChannelType.BASS_CTYPE_STREAM_ALAC:
                        return "ALAC";
                }
                return str;
            }
            if (type <= BASSChannelType.BASS_CTYPE_STREAM_AC3)
            {
                switch (type)
                {
                    case BASSChannelType.BASS_CTYPE_STREAM_TTA:
                        return "TTA";

                    case BASSChannelType.BASS_CTYPE_STREAM_AC3:
                        return "AC3";
                }
                return str;
            }
            switch (type)
            {
                case BASSChannelType.BASS_CTYPE_MUSIC_MOD:
                    return "MOD";

                case BASSChannelType.BASS_CTYPE_MUSIC_MTM:
                    return "MTM";

                case BASSChannelType.BASS_CTYPE_MUSIC_S3M:
                    return "S3M";

                case BASSChannelType.BASS_CTYPE_MUSIC_XM:
                    return "XM";

                case BASSChannelType.BASS_CTYPE_MUSIC_IT:
                    return "IT";

                case BASSChannelType.BASS_CTYPE_STREAM_WAV:
                case BASSChannelType.BASS_CTYPE_STREAM_WAV_PCM:
                case BASSChannelType.BASS_CTYPE_STREAM_WAV_FLOAT:
                    return "WAV";

                case (BASSChannelType.BASS_CTYPE_STREAM_WAV | BASSChannelType.BASS_CTYPE_STREAM_OGG):
                    return str;
            }
            return str;
        }
コード例 #6
0
ファイル: BassTags.cs プロジェクト: Crystallinqq/osu-2005
        private static IntPtr BASS_TAG_GetIntPtr(int stream, BASS_CHANNELINFO info, out BASSTag tagType)
        {
            IntPtr zero = IntPtr.Zero;

            tagType = BASSTag.BASS_TAG_UNKNOWN;
            if ((stream == 0) || (info == null))
            {
                return(zero);
            }
            BASSChannelType ctype = info.ctype;

            if ((ctype & BASSChannelType.BASS_CTYPE_STREAM_WAV) > BASSChannelType.BASS_CTYPE_UNKNOWN)
            {
                ctype = BASSChannelType.BASS_CTYPE_STREAM_WAV;
            }
            switch (ctype)
            {
            case BASSChannelType.BASS_CTYPE_STREAM_WMA:
            case BASSChannelType.BASS_CTYPE_STREAM_WMA_MP3:
                zero    = Un4seen.Bass.Bass.BASS_ChannelGetTags(stream, BASSTag.BASS_TAG_WMA);
                tagType = BASSTag.BASS_TAG_WMA;
                return(zero);

            case BASSChannelType.BASS_CTYPE_STREAM_WINAMP:
                zero = Un4seen.Bass.Bass.BASS_ChannelGetTags(stream, BASSTag.BASS_TAG_ID3V2);
                if (!(zero == IntPtr.Zero))
                {
                    tagType = BASSTag.BASS_TAG_ID3V2;
                    return(zero);
                }
                zero = Un4seen.Bass.Bass.BASS_ChannelGetTags(stream, BASSTag.BASS_TAG_APE);
                if (!(zero == IntPtr.Zero))
                {
                    tagType = BASSTag.BASS_TAG_APE;
                    return(zero);
                }
                zero = Un4seen.Bass.Bass.BASS_ChannelGetTags(stream, BASSTag.BASS_TAG_OGG);
                if (zero == IntPtr.Zero)
                {
                    zero = Un4seen.Bass.Bass.BASS_ChannelGetTags(stream, BASSTag.BASS_TAG_ID3);
                    if (zero != IntPtr.Zero)
                    {
                        tagType = BASSTag.BASS_TAG_ID3;
                    }
                    return(zero);
                }
                tagType = BASSTag.BASS_TAG_OGG;
                return(zero);

            case BASSChannelType.BASS_CTYPE_STREAM_OGG:
                zero = Un4seen.Bass.Bass.BASS_ChannelGetTags(stream, BASSTag.BASS_TAG_OGG);
                if (!(zero == IntPtr.Zero))
                {
                    tagType = BASSTag.BASS_TAG_OGG;
                    return(zero);
                }
                zero    = Un4seen.Bass.Bass.BASS_ChannelGetTags(stream, BASSTag.BASS_TAG_APE);
                tagType = BASSTag.BASS_TAG_APE;
                return(zero);

            case BASSChannelType.BASS_CTYPE_STREAM_MP1:
            case BASSChannelType.BASS_CTYPE_STREAM_MP2:
            case BASSChannelType.BASS_CTYPE_STREAM_MP3:
                zero = Un4seen.Bass.Bass.BASS_ChannelGetTags(stream, BASSTag.BASS_TAG_ID3V2);
                if (!(zero == IntPtr.Zero))
                {
                    tagType = BASSTag.BASS_TAG_ID3V2;
                    return(zero);
                }
                zero    = Un4seen.Bass.Bass.BASS_ChannelGetTags(stream, BASSTag.BASS_TAG_ID3);
                tagType = BASSTag.BASS_TAG_ID3;
                return(zero);

            case BASSChannelType.BASS_CTYPE_STREAM_AIFF:
            case BASSChannelType.BASS_CTYPE_STREAM_WAV:
            case BASSChannelType.BASS_CTYPE_STREAM_WAV_PCM:
            case BASSChannelType.BASS_CTYPE_STREAM_WAV_FLOAT:
                zero = Un4seen.Bass.Bass.BASS_ChannelGetTags(stream, BASSTag.BASS_TAG_RIFF_INFO);
                if (zero != IntPtr.Zero)
                {
                    tagType = BASSTag.BASS_TAG_RIFF_INFO;
                }
                return(zero);

            case BASSChannelType.BASS_CTYPE_MUSIC_MO3:
            case BASSChannelType.BASS_CTYPE_MUSIC_MOD:
            case BASSChannelType.BASS_CTYPE_MUSIC_MTM:
            case BASSChannelType.BASS_CTYPE_MUSIC_S3M:
            case BASSChannelType.BASS_CTYPE_MUSIC_XM:
            case BASSChannelType.BASS_CTYPE_MUSIC_IT:
                zero = Un4seen.Bass.Bass.BASS_ChannelGetTags(stream, BASSTag.BASS_TAG_MUSIC_NAME);
                if (zero != IntPtr.Zero)
                {
                    tagType = BASSTag.BASS_TAG_MUSIC_NAME;
                }
                return(zero);

            case BASSChannelType.BASS_CTYPE_STREAM_WV:
            case BASSChannelType.BASS_CTYPE_STREAM_WV_H:
            case BASSChannelType.BASS_CTYPE_STREAM_WV_L:
            case BASSChannelType.BASS_CTYPE_STREAM_WV_LH:
            case BASSChannelType.BASS_CTYPE_STREAM_OFR:
            case BASSChannelType.BASS_CTYPE_STREAM_APE:
            case BASSChannelType.BASS_CTYPE_STREAM_FLAC:
            case BASSChannelType.BASS_CTYPE_STREAM_SPX:
            case BASSChannelType.BASS_CTYPE_STREAM_MPC:
            case BASSChannelType.BASS_CTYPE_STREAM_TTA:
                zero = Un4seen.Bass.Bass.BASS_ChannelGetTags(stream, BASSTag.BASS_TAG_APE);
                if (zero == IntPtr.Zero)
                {
                    zero = Un4seen.Bass.Bass.BASS_ChannelGetTags(stream, BASSTag.BASS_TAG_OGG);
                    if (zero == IntPtr.Zero)
                    {
                        zero = Un4seen.Bass.Bass.BASS_ChannelGetTags(stream, BASSTag.BASS_TAG_ID3V2);
                        if (zero == IntPtr.Zero)
                        {
                            zero = Un4seen.Bass.Bass.BASS_ChannelGetTags(stream, BASSTag.BASS_TAG_ID3);
                            if (zero != IntPtr.Zero)
                            {
                                tagType = BASSTag.BASS_TAG_ID3;
                            }
                            return(zero);
                        }
                        tagType = BASSTag.BASS_TAG_ID3V2;
                        return(zero);
                    }
                    tagType = BASSTag.BASS_TAG_OGG;
                    return(zero);
                }
                tagType = BASSTag.BASS_TAG_APE;
                return(zero);

            case BASSChannelType.BASS_CTYPE_STREAM_MIDI:
                zero = Un4seen.Bass.Bass.BASS_ChannelGetTags(stream, BASSTag.BASS_TAG_MIDI_TRACK);
                if (zero == IntPtr.Zero)
                {
                    zero    = Un4seen.Bass.Bass.BASS_ChannelGetTags(stream, BASSTag.BASS_TAG_RIFF_INFO);
                    tagType = BASSTag.BASS_TAG_RIFF_INFO;
                    return(zero);
                }
                tagType = BASSTag.BASS_TAG_MIDI_TRACK;
                return(zero);

            case BASSChannelType.BASS_CTYPE_STREAM_AAC:
            case BASSChannelType.BASS_CTYPE_STREAM_MP4:
            case BASSChannelType.BASS_CTYPE_STREAM_ALAC:
                zero = Un4seen.Bass.Bass.BASS_ChannelGetTags(stream, BASSTag.BASS_TAG_MP4);
                if (zero == IntPtr.Zero)
                {
                    zero = Un4seen.Bass.Bass.BASS_ChannelGetTags(stream, BASSTag.BASS_TAG_ID3V2);
                    if (zero == IntPtr.Zero)
                    {
                        zero = Un4seen.Bass.Bass.BASS_ChannelGetTags(stream, BASSTag.BASS_TAG_APE);
                        if (zero == IntPtr.Zero)
                        {
                            zero = Un4seen.Bass.Bass.BASS_ChannelGetTags(stream, BASSTag.BASS_TAG_OGG);
                            if (zero != IntPtr.Zero)
                            {
                                tagType = BASSTag.BASS_TAG_OGG;
                            }
                            return(zero);
                        }
                        tagType = BASSTag.BASS_TAG_APE;
                        return(zero);
                    }
                    tagType = BASSTag.BASS_TAG_ID3V2;
                    return(zero);
                }
                tagType = BASSTag.BASS_TAG_MP4;
                return(zero);
            }
            return(IntPtr.Zero);
        }
コード例 #7
0
 public BASS_PLUGINFORM(string Name, string Extensions, BASSChannelType ChannelType)
 {
     this.ctype = ChannelType;
     this.name  = Name;
     this.exts  = Extensions;
 }
コード例 #8
0
ファイル: Bass.cs プロジェクト: soeminnminn/BattleCity
 public BASS_PLUGINFORM(string Name, string Extensions, BASSChannelType ChannelType)
 {
     this.name = string.Empty;
     this.exts = string.Empty;
     this.ctype = ChannelType;
     this.name = Name;
     this.exts = Extensions;
 }