dotnet / dotnet/maui

Framework for audio playback

Open
#7,152 12 comments 20 reactions 0 assignees View on GitHub
area-essentials proposal/open
Dominant language
C#
Stars
23.3k
Forks
2k
Avg merge
1d 10h
Merged PRs (30d)
297

Description

### Description

Currently, Maui does not have any audio playback framework. Implementing such an API is relatively simple.
However, I noticed that in places like Stackoverflow there are many examples for Xamarin that have memory leaks and other bugs for various reasons.
I know that now, when we are approaching the release, it is quite late to add such a large interface, but I think that it is worth considering as part of long-term plans in order to systematize some assumptions.

### API content
I think the first step should be classes that allow to:
* Play, pause, stop audio,
* Set position, playback volume,
* Implement custom, low-level filters on the stream.

Then we might consider adding:
* Changing the pitch, panorama of the sound played,
* Recording audio from a microphone,

### The most important difficulties
Windows, iOS, Mac, and Android all have different sets of audio formats supported by default. For example, iOS does not natively support the OGG format.
Interfaces returning a list of supported codecs / containers and good documentation would be necessary.

If this proposal is accepted, I will gladly implement it.

### Public API Changes

We should add custom interface, something like ```Microsoft.Maui.Media.Audio```

### Intended Use-Case

Many apps use simple audio for informing users about in-app events.
Implementing that option in Maui would simplify the work needed and encourage more developers to use this.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.