this repo has no description
at fixPythonPipStalling 60 lines 1.7 kB view raw
1/* 2This file is part of Darling. 3 4Copyright (C) 2020 Lubos Dolezel 5 6Darling is free software: you can redistribute it and/or modify 7it under the terms of the GNU General Public License as published by 8the Free Software Foundation, either version 3 of the License, or 9(at your option) any later version. 10 11Darling is distributed in the hope that it will be useful, 12but WITHOUT ANY WARRANTY; without even the implied warranty of 13MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14GNU General Public License for more details. 15 16You should have received a copy of the GNU General Public License 17along with Darling. If not, see <http://www.gnu.org/licenses/>. 18*/ 19#include "AudioFileMP3.h" 20#include "AVFormatFileObject.h" 21#include "AudioFileFormatGeneric.h" 22 23class AudioFileFormatMP3 : public AudioFileFormatGeneric 24{ 25public: 26 AudioFileFormatMP3() : AudioFileFormatGeneric('.mp3', "mp3") {} 27protected: 28 const Description& description() const override 29 { 30 static const Description d = { 31 .name = "MPEG Layer 3", 32 .extensions = { "mp3" }, 33 .utis = { "public.mp3", "public.audio", "public.data" }, 34 .mimeTypes = { "audio/mpeg" }, 35 .formats = { '.mp3' }, 36 }; 37 return d; 38 } 39}; 40 41class MP3Component : public AVFormatFileObject<AudioFileFormatMP3, AudioFileMP3, '.mp3'> 42{ 43public: 44 MP3Component(AudioComponentInstance inInstance) : AVFormatFileObject(inInstance) {} 45}; 46 47#pragma GCC visibility push(default) 48AUDIOCOMPONENT_ENTRY(AudioFileComponentFactory, MP3Component); 49#pragma GCC visibility pop 50 51AudioFileMP3::AudioFileMP3() 52: AudioFileObject('.mp3') 53{ 54 55} 56 57Boolean AudioFileMP3::IsDataFormatSupported(const AudioStreamBasicDescription *inFormat) 58{ 59 return true; 60}