Releases: jfversluis/Plugin.Maui.Audio
v4.0.0: Streaming audio and audio listeners
With this release you can now access the audio stream directly while recording. Use the new AudioStreamer
for this. This allows you to process the audio directly as it comes in 🤯
To help you with this processing, we alap added a couple of audio listeners you can use out of the box!
With these listeners you can tap into the live audio stream and do whatever you want with it! This version comes with pre-built listeners to:
- Detect silence
- Measure decibels
- Measure RMS
You can use just one of these, or all of them together. Or, if you want to do some other processing, you can write your own listener as well!
In addition to that we have updated the plugin to use .NET 9, added documentation for all this, added missing API documentation in this library and fixed a couple of bugs.
Additionally, you can now fast play an already prepared audio channel and you have some additional options to set specific to Android playback.
Big shoutout to @Toine-db and @taublast for doing the hard work on this version 🙏
Enjoy!
What's Changed
- Recording stream option with eventhandler for LinearPCM by @Toine-db in #160
- Add AudioContentType & AudioUsageKind for Android by @jfversluis in #163
- Add fast-Play method to AudioMixer by @taublast in #158
- fix audio stream options may crash stream by @Toine-db in #165
- Audio listeners by @Toine-db in #166
- Add missing XML API docs by @jfversluis in #167
- Update to .NET 9 by @jfversluis in #168
- Documentation, audio manipulation example, and splitting audio in different channels by @Toine-db in #169
- Fix sample pages layout by @jfversluis in #172
- Remove obsoleted SetSpeed method by @jfversluis in #170
- Audio should not play when changing speed by @jfversluis in #171
- Improve READMEs by @jfversluis in #174
New Contributors
Full Changelog: v3.1.1...v4.0.0
v4.0.0 Preview 2: silence detection through audio listeners
@Toine-db didn't stop at just adding streaming support, he has now added audio listeners.
With these listeners you can tap into the live audio stream and do whatever you want with it! This version comes with pre-built listeners to:
- Detect silence
- Measure decibels
- Measure RMS
You can use just one of these, or all of them together. Or, if you want to do some other processing, you can write your own listener as well!
In addition to that we have updated the plugin to use .NET 9, added documentation for all this, added missing API documentation in this library and fixed a couple of bugs.
Please let us know how you like all this!
What's Changed
- fix audio stream options may crash stream by @Toine-db in #165
- Audio listeners by @Toine-db in #166
- Add missing XML API docs by @jfversluis in #167
- Update to .NET 9 by @jfversluis in #168
- Documentation, audio manipulation example, and splitting audio in different channels by @Toine-db in #169
- Fix sample pages layout by @jfversluis in #172
- Remove obsoleted SetSpeed method by @jfversluis in #170
- Audio should not play when changing speed by @jfversluis in #171
Full Changelog: v4.0.0-preview1...v4.0.0-preview2
v4.0.0 Preview 1: Streaming audio is here
With this release you can now access the audio stream directly while recording. Use the new AudioStreamer
for this. This allows you to process the audio directly as it comes in 🤯
Big shout out to @Toine-db for doing the hard work on this 🙏
Additionally, you can now fast play an already prepared audio channel and you have some additional options to set specific to Android playback.
Let us know how you like all these new goodies!
What's Changed
- Recording stream option with event handler for LinearPCM by @Toine-db in #160
- Add AudioContentType & AudioUsageKind for Android by @jfversluis in #163
- Add fast-Play method to AudioMixer by @taublast in #158
New Contributors
Full Changelog: v3.1.1...v4.0.0-preview1
v3.1.1: Minor bugfixes
Just some minor bugfixes for this version and before we add some bigger new features!
Check out the details below!
What's Changed
- Fix audio file storage path for reliability by @nolios in #159
- Move stopwatch.Reset to OnPlaybackEnded on Android by @jfversluis in #162
New Contributors
Full Changelog: v3.1.0...v3.1.1
v3.1.0: Now with recording AAC support!
What's Changed
Big thanks to @jonmdev for adding recording in AAC support to all platforms!
And some overall improvements by @taublast!
- Update Info.plist to allow background audio recording permission by @BenBtg in #143
- Correct Android speed range by @billylo1 in #150
- Enable reusage of AudioPlayer for different sources and some other improvements by @taublast in #153
- Make recording in-place and fix the WAV header on the Android platform by @t871005y in #151
- Add Audio Compression (AAC in M4A/MP4) Support in Android/iOS/Windows by @jonmdev in #155
- Feature/sl remove maui controls dependency by @bijington in #127
New Contributors
- @BenBtg made their first contribution in #143
- @billylo1 made their first contribution in #150
- @taublast made their first contribution in #153
- @jonmdev made their first contribution in #155
Full Changelog: v3.0.1...v3.1.0
v3.0.1: Bugs Fixed!
Just a point release that fixes some bugs! Enjoy!
What's Changed
- Remove the dependency on Maui controls by @bijington in #124
- Fixed CurrentPosition on android platform by @t871005y in #116
- Fix android crash Dispose() call in PlaybackEnded event by @ndegheselle in #122
- Fix the issue of the audio recording segment repeating at the end on the Android platform by @t871005y in #129
New Contributors
- @t871005y made their first contribution in #116
- @ndegheselle made their first contribution in #122
Full Changelog: v3.0.0...v3.0.1
v3.0.0: Recording Options
It's time! Version 3.0 of this plugin is hereby released!
If you have been on preview 3 of 3.0 then nothing has changed other than that this is labeled stable now. If you're coming from v2.1, find all the details and changes below.
Please note, there is a breaking change in here which has to do with setting the AsyncAudioPlayer.Speed
. This property does not have a setter anymore. Instead use the new SetSpeed()
method.
iOS & macOS Recording Session Options
For iOS (and macOS) you have different session options you can configure which determine how sound behaves whenever you start recording or playing something. Up until this version, we decided for you how that was handled, now we're putting this power in your hands!
While initializing this plugin you can now do this:
var builder = MauiApp.CreateBuilder();
builder
.UseMauiApp<App>()
.AddAudio(
playbackOptions =>
{
#if IOS || MACCATALYST
playbackOptions.Category = AVFoundation.AVAudioSessionCategory.Playback;
#endif
},
recordingOptions =>
{
#if IOS || MACCATALYST
recordingOptions.Category = AVFoundation.AVAudioSessionCategory.Record;
recordingOptions.Mode = AVFoundation.AVAudioSessionMode.Default;
recordingOptions.CategoryOptions = AVFoundation.AVAudioSessionCategoryOptions.DefaultToSpeaker;
#endif
})
And set the right recording and/or playback options for you.
If you're using the static instance, you can simply set it like this:
AudioManager.Current.SharedPlayerOptions = new
{
Category = AVFoundation.AVAudioSessionCategory.Playback;
}
Or if you want to create a player/recorder through the manager, you can pass in the options there too:
var player = AudioManager.Current.CreatePlayer(new
{
Category = AVFoundation.AVAudioSessionCategory.Playback;
});
AudioRecordingOptions
With the new AudioRecordingOptions
object we have gained fine-grained control over the different options that you can use for recording audio. You can now set sample rate, channels, bit depth and encoding and to top it all off there is a switch that allows you to throw an exception if one of the configured options is not supported on the platform you're running on. The power is in your hands!
Thank you @borrmann for all this goodness!
Bugfixes & other changes
And there is a good number of other changes too! Well, see all the details in the PRs listed below 👇
What's Changed
- Update to .NET 8 by @jfversluis in #76
- Add the source file for the nuget logo by @bijington in #79
- Make sure the cache file directory exists by @bijington in #78
- Correct the recording docs example and add the sample to playing by @bijington in #80
- Remove the set of Loop in the ctor for AudioPlayer by @bijington in #82
- Add README to NuGet Package by @jfversluis in #96
- Make note on how to get file path from recording clearer by @jfversluis in #99
- Generate test NuGets on PR builds by @jfversluis in #105
- Report generated NuGet package version to GitHub status by @jfversluis in #106
- Only add NuGet status for PRs by @jfversluis in #107
- Only push NuGet from main repo by @jfversluis in #110
- Provide options to allow for customising the iOS/macOS specific session settings by @bijington in #101
- Swap to using MixWithOthers for the AVAudioSessionCategoryOptions by @bijington in #111
- Recording options and Bug Fixes by @borrmann in #108
- fixes issues with seek and speed by @borrmann in #109
New Contributors
Full Changelog: v2.1.0...v3.0.0
v3.0.0 Preview 3: All Kinds of Options!
This is a crazy cool release thanks to @bijington and @borrmann! Why? Keep scrolling!
Please note, there is at least 1 breaking change in here which has to do with setting the AsyncAudioPlayer.Speed
. This property does not have a setter anymore. Instead use the new SetSpeed()
method.
iOS & macOS Recording Session Options
For iOS (and macOS) you have different session options you can configure which determine how sound behaves whenever you start recording or playing something. Up until this version, we decided for you how that was handled, now we're putting this power in your hands!
While initializing this plugin you can now do this:
var builder = MauiApp.CreateBuilder();
builder
.UseMauiApp<App>()
.AddAudio(
playbackOptions =>
{
#if IOS || MACCATALYST
playbackOptions.Category = AVFoundation.AVAudioSessionCategory.Playback;
#endif
},
recordingOptions =>
{
#if IOS || MACCATALYST
recordingOptions.Category = AVFoundation.AVAudioSessionCategory.Record;
recordingOptions.Mode = AVFoundation.AVAudioSessionMode.Default;
recordingOptions.CategoryOptions = AVFoundation.AVAudioSessionCategoryOptions.DefaultToSpeaker;
#endif
})
And set the right recording and/or playback options for you.
If you're using the static instance, you can simply set it like this:
AudioManager.Current.SharedPlayerOptions = new
{
Category = AVFoundation.AVAudioSessionCategory.Playback;
}
Or if you want to create a player/recorder through the manager, you can pass in the options there too:
var player = AudioManager.Current.CreatePlayer(new
{
Category = AVFoundation.AVAudioSessionCategory.Playback;
});
AudioRecordingOptions
With the new AudioRecordingOptions
object we have gained fine-grained control over the different options that you can use for recording audio. You can now set sample rate, channels, bit depth and encoding and to top it all off there is a switch that allows you to throw an exception if one of the configured options is not supported on the platform you're running on. The power is in your hands!
Thank you @borrmann for all this goodness!
Bugfixes
And there is a good number of bugfixes too! Mostly related to seeking within audio as well as setting the speed and then there is something with removing the temporary file that is used while recording on Android... Well, see all the details in the PRs listed below 👇
What's Changed
- Add README to NuGet Package by @jfversluis in #96
- Make note on how to get file path from recording clearer by @jfversluis in #99
- Provide options to allow for customising the iOS/macOS specific session settings by @bijington in #101
- Swap to using MixWithOthers for the AVAudioSessionCategoryOptions by @bijington in #111
- Recording options and Bug Fixes by @borrmann in #108
- fixes issues with seek and speed by @borrmann in #109
New Contributors
Full Changelog: v3.0.0-preview2...v3.0.0-preview3
v3.0.0 Preview 2: Minor Android Bugfixes
What's Changed
- Make sure the cache file directory exists by @bijington in #78
- Remove the set of Loop in the ctor for AudioPlayer by @bijington in #82
Full Changelog: v3.0.0-preview1...v3.0.0-preview2
v3.0.0 Preview 1: .NET 8 is here!
Updated the library to use .NET 8!
What's Changed
- Update to .NET 8 by @jfversluis in #76
Full Changelog: v2.1.0...v3.0.0-preview1