Skip to content

Add support for MP3 #335

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 2 commits into from
Closed

Add support for MP3 #335

wants to merge 2 commits into from

Conversation

veelion
Copy link

@veelion veelion commented Mar 31, 2022

No description provided.

@bastibe
Copy link
Owner

bastibe commented Mar 31, 2022

I think you mixed up the subtypes and default_subtypes, as mentioned in the comments. If you fix this, I'll gladly merge your pull request. Otherwise, I can also do the changes myself, as you wish.

@veelion
Copy link
Author

veelion commented Apr 2, 2022

I think you mean there is no default_subtype for the format 'MPEG', so I add 'MP3' for it in 'default_subtypes'. Please fix it if I was wrong. BTW, my vim automatically removed three space at the end of line in this commit.

'ALAC_16': 0x0070, # Apple Lossless Audio Codec (16 bit).
'ALAC_20': 0x0071, # Apple Lossless Audio Codec (20 bit).
'ALAC_24': 0x0072, # Apple Lossless Audio Codec (24 bit).
'ALAC_32': 0x0073, # Apple Lossless Audio Codec (32 bit).
'MPEG_LAYER_I': 0x0080, # MPEG-1 Audio Layer I.
'MPEG_LAYER_II': 0x0081, # MPEG-1 Audio Layer II.
'MP3': 0x0082, # MPEG-2 Audio Layer III.
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'MPEG_LAYER_III':   0x0082,  #MPEG-2 Audio Layer III.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

libsndfile library return "MPEG_LAYER_III" subtype

Copy link

@magicse magicse left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tested it with changes and it work well.
Also I made tested pull request to pythorch audio pytorch/audio#2711

@@ -128,6 +136,7 @@
'OGG': 'VORBIS',
'MPC2K': 'PCM_16',
'RF64': 'PCM_16',
'MPEG': 'MP3',
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'MPEG': 'MPEG_LAYER_III',

@bastibe
Copy link
Owner

bastibe commented Sep 27, 2022

This has already been incorporated in #325

@bastibe bastibe closed this Sep 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants