bluefireteam / audioplayers

A Flutter package to play multiple audio files simultaneously (Android/iOS/web/Linux/Windows/macOS)
https://pub.dartlang.org/packages/audioplayers
MIT License
2.01k stars 844 forks source link

`ogg` support on Windows? #1255

Open jtmcdole opened 2 years ago

jtmcdole commented 2 years ago

Checklist

Use case / Problem

AudioPlayers: Error setting url to '/C:/Users/john/AppData/Local/Temp/music/cool-vibes.ogg'.

Proposal / Solution

Platforms

Gustl22 commented 2 years ago

Confirmed, we are happy for any Merge Requests. I don't know exactly how to solve this, maybe it is sufficient just to install some codecs. @azchohfi do you know how to approach different codecs?

Some refs: https://docs.microsoft.com/en-us/windows/win32/api/mfmediaengine/ https://github.com/bluefireteam/audioplayers/blob/6fad1cc4443e623e5c94519f130b4004b2dc3857/packages/audioplayers_windows/windows/MediaEngineWrapper.cpp#L318

jtmcdole commented 2 years ago

Does this project require (or have a stance) on pre-Windows 10 support?

Opus in windows 10

GUID Description Format Tag (FOURCC)
MFAudioFormat_Opus OpusSupported in Windows 10 and later. WAVE_FORMAT_OPUS (0x704F)

And a random note somewhere about WMDM_FORMATCODE_OGG.

Assuming pre-windows 10 support; my second guess would be opusfile / opus tools? https://www.opus-codec.org/release/dev/2020/06/27/opusfile_0_12.html

Gustl22 commented 2 years ago

I think minimum supported Windows version for Flutter is 7. But we only support Windows 8+, see #1140.

This also doesn't mean, we cannot add extra functionality which only works for Windows 10+ versions.

I never developed any windows applications, so I think I'm not a big help here ^^. If you have a solution, let us know :)

jtmcdole commented 2 years ago

I'll chew on it! Right now the easy work around is "don't use ogg if you plan to target windows".

Along the lines of #1140, If I just wait early next year:

Windows 8.1 will reach the end of support on January 10, 2023