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

Support additional audio types #55

Closed
forsakeninfinity opened this issue Jun 16, 2023 · 2 comments
Closed

Support additional audio types #55

forsakeninfinity opened this issue Jun 16, 2023 · 2 comments
Labels
enhancement New feature or request

Comments

@forsakeninfinity
Copy link

forsakeninfinity commented Jun 16, 2023

It seems like JL doesn't play some common audio file types so it bugs out with some of the sources from the local audio server. This has become a bigger problem now that the recommended data source has opus audio. You simply get a "Error playing Audio" error if you configure the local audio server as a source with the recommended data source now. FWIW, JL can play the alternative / older mp3 sources but some of the older sources were using .aac (in particular, the nhk and shinmeikai8 sources).

The workaround for now is to use the new mp3 sources. But it would be nice if JL could support playing other audio types. A canonical list of the types used by the local audio server are available here: https://github.com/themoeway/local-audio-yomichan/blob/dadd63feb35e89b9030fd18c036d59c45020436b/plugin/server.py#L28

(Logs suggest JL only supports mp3 audio fwiw.

System.IO.InvalidDataException: Invalid MP3 file - no MP3 Frames Detected
   at NAudio.Wave.Mp3FileReaderBase..ctor(Stream inputStream, FrameDecompressorBuilder frameDecompressorBuilder, Boolean ownInputStream)
   at JL.Windows.Utilities.WindowsUtils.<>c__DisplayClass56_0.<PlayAudio>b__0() in D:\a\JL\JL\JL.Windows\Utilities\WindowsUtils.cs:line 362

)

@rampaa rampaa added the enhancement New feature or request label Jun 17, 2023
@rampaa
Copy link
Owner

rampaa commented Jun 17, 2023

baddea6 adds support to additional audio formats. JL now can handle .mp3, .aac, .m4a, .ogg (Vorbis), .oga (Vorbis), .flac and probably a few other audio formats.

But JL still does not support the .opus format. See: naudio/NAudio#674.

@rampaa
Copy link
Owner

rampaa commented Mar 1, 2024

Adding opus support is not trivial and I don't want to add another huge dependency to add it either. Unless NAudio itself (or a comparable .NET library) adds support for opus format JL will not support it.

Ogg/Vorbis should be pretty comparable to Opus/Vorbis. And I've opened an issue for Ogg/Vorbis support in the local audio server repo, see: yomidevs/local-audio-yomichan#23. Let's hope they offer an Ogg/Vorbis version as well.

@rampaa rampaa closed this as not planned Won't fix, can't repro, duplicate, stale Mar 1, 2024
@rampaa rampaa closed this as completed Mar 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants