Skip to content
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

Audio play mp3 Enhancement #266

Open
cpyburn opened this issue Jun 25, 2021 · 5 comments
Open

Audio play mp3 Enhancement #266

cpyburn opened this issue Jun 25, 2021 · 5 comments
Labels
audio Related to DirectX Tool Kit for Audio documentation

Comments

@cpyburn
Copy link

cpyburn commented Jun 25, 2021

Would be awesome if you added mp3 support to the audio.

@walbourn walbourn added audio Related to DirectX Tool Kit for Audio enhancement documentation and removed enhancement labels Jun 25, 2021
@walbourn
Copy link
Member

walbourn commented Jun 25, 2021

The SoundStreamInstance class is designed to stream content from XACT WaveBanks, so that class will only support what XACT did: PCM, ADPCM, xWMA, and XMA2 (Xbox only).

For MP3 you can use DynamicSoundEffectInstance to integrate into the DirectX Tool Kit for Audio if you have a decompression library for the format. I don't have an explicit tutorial on this, but I should so I'll make this issue a doc request. I do have this implemented using WMA via MediaFoundation in the test suite.

I also have a Xaudio2 sample (i.e. doesn't use DirectX Tool Kit for Audio) for WMA here.

Note that due to patent issues, my tutorial on additional compressed streaming formats would likely not be MP3 but Ogg Vorbis instead, but the basic pattern would apply to any audio decompression library that produces PCM data. For background on the concerns here, see wikipedia.

@walbourn
Copy link
Member

It looks like there's an Ogg Vorbis library on NuGet I could use for the tutorial here:

https://www.nuget.org/packages/ogg-msvc-x64/

https://www.nuget.org/packages/ogg-msvc-x86/

@cpyburn
Copy link
Author

cpyburn commented Jun 25, 2021

The SoundStreamInstance class is designed to stream content from XACT WaveBanks, so that class will only support what XACT did: PCM, ADPCM, xWMA, and XMA2 (Xbox only).

For MP3 you can use DynamicSoundEffectInstance to integrate into the DirectX Tool Kit for Audio if you have a decompression library for the format. I don't have an explicit tutorial on this, but I should so I'll make this issue a doc request. I do have this implemented using WMA via MediaFoundation in the test suite.

I also have a Xaudio2 sample (i.e. doesn't use DirectX Tool Kit for Audio) for WMA here.

Note that due to patent issues, my tutorial on additional compressed streaming formats would likely not be MP3 but Ogg Vorbis instead, but the basic pattern would apply to any audio decompression library that produces PCM data. For background on the concerns here, see wikipedia.

Awesome, will you update here once you have the document completed?

@walbourn
Copy link
Member

Yes.

@walbourn walbourn pinned this issue Aug 5, 2021
@walbourn walbourn self-assigned this Aug 18, 2021
@walbourn walbourn unpinned this issue Sep 10, 2021
@walbourn walbourn pinned this issue Sep 30, 2021
@walbourn walbourn unpinned this issue Oct 15, 2021
@walbourn walbourn pinned this issue Oct 16, 2021
@walbourn walbourn unpinned this issue Jan 12, 2022
@cpyburn
Copy link
Author

cpyburn commented May 25, 2022

Hey Chuck, I was about to give this a shot. I see that you posted some helpful links previously but haven't gotten around to the documentation. Just curious if this is still on your radar or if I should just try to backwards engineer what you have already done?

"I do have this implemented using WMA via MediaFoundation in the test suite."

@walbourn walbourn removed their assignment Nov 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
audio Related to DirectX Tool Kit for Audio documentation
Projects
None yet
Development

No branches or pull requests

2 participants