Skip to content

Instantly share code, notes, and snippets.

@mcsee
Last active August 21, 2023 22:20
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save mcsee/fd1c07ce153817a5572cb3cb84ae1007 to your computer and use it in GitHub Desktop.
class Mp3Converter {
convertToMp3(source, mimeType) {
if(mimeType.equals("audio/mpeg")) {
this.convertMpegToMp3(source)
} else if(mimeType.equals("audio/wav")) {
this.convertWavToMp3(source)
} else if(mimeType.equals("audio/ogg")) {
this.convertOggToMp3(source)
} else if(...) {
// Lots of new clauses
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment