├── ios ├── Assets │ └── .gitkeep ├── Classes │ ├── SoundsPlugin.h │ ├── SoundsPlugin.m │ ├── SwiftSoundsPlugin.swift │ └── Track.swift ├── .gitignore └── sounds.podspec ├── android ├── settings.gradle ├── src │ └── main │ │ ├── res │ │ ├── values │ │ │ ├── strings.xml │ │ │ ├── colors.xml │ │ │ ├── dimens.xml │ │ │ └── styles.xml │ │ ├── drawable-hdpi │ │ │ ├── ic_pause.png │ │ │ ├── ic_play_arrow.png │ │ │ ├── ic_skip_next_on.png │ │ │ ├── ic_skip_prev_on.png │ │ │ ├── ic_skip_next_off.png │ │ │ └── ic_skip_prev_off.png │ │ ├── drawable-mdpi │ │ │ ├── ic_pause.png │ │ │ ├── ic_play_arrow.png │ │ │ ├── ic_skip_next_on.png │ │ │ ├── ic_skip_prev_on.png │ │ │ ├── ic_skip_next_off.png │ │ │ └── ic_skip_prev_off.png │ │ ├── drawable-xhdpi │ │ │ ├── ic_pause.png │ │ │ ├── ic_play_arrow.png │ │ │ ├── ic_skip_next_off.png │ │ │ ├── ic_skip_next_on.png │ │ │ ├── ic_skip_prev_off.png │ │ │ └── ic_skip_prev_on.png │ │ ├── drawable-xxhdpi │ │ │ ├── ic_pause.png │ │ │ ├── ic_play_arrow.png │ │ │ ├── ic_skip_next_on.png │ │ │ ├── ic_skip_prev_on.png │ │ │ ├── ic_skip_next_off.png │ │ │ └── ic_skip_prev_off.png │ │ ├── mipmap-hdpi │ │ │ └── ic_launcher.png │ │ ├── mipmap-mdpi │ │ │ └── ic_launcher.png │ │ ├── mipmap-xhdpi │ │ │ └── ic_launcher.png │ │ ├── drawable-xxxhdpi │ │ │ ├── ic_pause.png │ │ │ ├── ic_play_arrow.png │ │ │ ├── ic_skip_next_off.png │ │ │ ├── ic_skip_next_on.png │ │ │ ├── ic_skip_prev_off.png │ │ │ └── ic_skip_prev_on.png │ │ ├── mipmap-xxhdpi │ │ │ └── ic_launcher.png │ │ ├── mipmap-xxxhdpi │ │ │ └── ic_launcher.png │ │ ├── raw │ │ │ └── warner_tautz_off_broadway.mp3 │ │ ├── values-w820dp │ │ │ └── dimens.xml │ │ └── layout │ │ │ └── activity_main.xml │ │ ├── java │ │ └── com │ │ │ └── bsutton │ │ │ └── sounds │ │ │ ├── PlayerAudioModel.java │ │ │ ├── RecorderAudioModel.java │ │ │ └── Track.java │ │ └── AndroidManifest.xml ├── .gitignore ├── gradle.properties ├── build.gradle └── gradlew.bat ├── example ├── android │ ├── settings_aar.gradle │ ├── app │ │ ├── src │ │ │ ├── main │ │ │ │ ├── samples │ │ │ │ │ ├── sample.aac │ │ │ │ │ ├── sample.caf │ │ │ │ │ ├── sample.mp3 │ │ │ │ │ ├── sample.ogg │ │ │ │ │ ├── sample.opus │ │ │ │ │ └── sample.pcm │ │ │ │ ├── res │ │ │ │ │ ├── mipmap-hdpi │ │ │ │ │ │ └── ic_launcher.png │ │ │ │ │ ├── mipmap-mdpi │ │ │ │ │ │ └── ic_launcher.png │ │ │ │ │ ├── mipmap-xhdpi │ │ │ │ │ │ └── ic_launcher.png │ │ │ │ │ ├── mipmap-xxhdpi │ │ │ │ │ │ └── ic_launcher.png │ │ │ │ │ ├── mipmap-xxxhdpi │ │ │ │ │ │ └── ic_launcher.png │ │ │ │ │ ├── drawable │ │ │ │ │ │ └── launch_background.xml │ │ │ │ │ ├── drawable-v21 │ │ │ │ │ │ └── launch_background.xml │ │ │ │ │ ├── values │ │ │ │ │ │ └── styles.xml │ │ │ │ │ └── values-night │ │ │ │ │ │ └── styles.xml │ │ │ │ ├── gen │ │ │ │ │ └── com │ │ │ │ │ │ └── bsutton │ │ │ │ │ │ └── sounds │ │ │ │ │ │ └── example │ │ │ │ │ │ ├── R.java │ │ │ │ │ │ ├── Manifest.java │ │ │ │ │ │ └── BuildConfig.java │ │ │ │ └── AndroidManifest.xml │ │ │ ├── profile │ │ │ │ ├── gen │ │ │ │ │ └── com │ │ │ │ │ │ └── example │ │ │ │ │ │ └── example │ │ │ │ │ │ ├── R.java │ │ │ │ │ │ ├── Manifest.java │ │ │ │ │ │ └── BuildConfig.java │ │ │ │ └── AndroidManifest.xml │ │ │ ├── debug │ │ │ │ ├── gen │ │ │ │ │ └── com │ │ │ │ │ │ └── bsutton │ │ │ │ │ │ └── sounds │ │ │ │ │ │ └── example │ │ │ │ │ │ ├── R.java │ │ │ │ │ │ ├── Manifest.java │ │ │ │ │ │ └── BuildConfig.java │ │ │ │ └── AndroidManifest.xml │ │ │ └── androidTest │ │ │ │ └── java │ │ │ │ └── soundPlayerPlugin │ │ │ │ └── EmbeddingV1ActivityTest.java │ │ └── build.gradle │ ├── gradle.properties │ ├── .gitignore │ ├── gradle │ │ └── wrapper │ │ │ └── gradle-wrapper.properties │ ├── settings.gradle │ └── build.gradle ├── ios │ ├── Runner │ │ ├── Runner-Bridging-Header.h │ │ ├── Assets.xcassets │ │ │ ├── LaunchImage.imageset │ │ │ │ ├── LaunchImage.png │ │ │ │ ├── LaunchImage@2x.png │ │ │ │ ├── LaunchImage@3x.png │ │ │ │ ├── README.md │ │ │ │ └── Contents.json │ │ │ └── AppIcon.appiconset │ │ │ │ ├── Icon-App-20x20@1x.png │ │ │ │ ├── Icon-App-20x20@2x.png │ │ │ │ ├── Icon-App-20x20@3x.png │ │ │ │ ├── Icon-App-29x29@1x.png │ │ │ │ ├── Icon-App-29x29@2x.png │ │ │ │ ├── Icon-App-29x29@3x.png │ │ │ │ ├── Icon-App-40x40@1x.png │ │ │ │ ├── Icon-App-40x40@2x.png │ │ │ │ ├── Icon-App-40x40@3x.png │ │ │ │ ├── Icon-App-60x60@2x.png │ │ │ │ ├── Icon-App-60x60@3x.png │ │ │ │ ├── Icon-App-76x76@1x.png │ │ │ │ ├── Icon-App-76x76@2x.png │ │ │ │ ├── Icon-App-1024x1024@1x.png │ │ │ │ ├── Icon-App-20x20@1x-1.png │ │ │ │ ├── Icon-App-40x40@1x-1.png │ │ │ │ ├── Icon-App-40x40@1x-2.png │ │ │ │ ├── Icon-App-40x40@2x-2.png │ │ │ │ ├── Icon-App-40x40@2x-3.png │ │ │ │ ├── Icon-App-60x60@2x-1.png │ │ │ │ ├── Icon-App-60x60@2x-2.png │ │ │ │ ├── Icon-App-60x60@3x-1.png │ │ │ │ ├── Icon-App-60x60@3x-2.png │ │ │ │ ├── Icon-App-83.5x83.5@2x.png │ │ │ │ ├── Icon-App-83.5x83.5@2x-1.png │ │ │ │ └── Contents.json │ │ ├── AppDelegate.swift │ │ ├── Base.lproj │ │ │ ├── Main.storyboard │ │ │ └── LaunchScreen.storyboard │ │ └── Info.plist │ ├── Flutter │ │ ├── Debug.xcconfig │ │ ├── Release.xcconfig │ │ └── AppFrameworkInfo.plist │ ├── Runner.xcodeproj │ │ ├── project.xcworkspace │ │ │ ├── contents.xcworkspacedata │ │ │ └── xcshareddata │ │ │ │ ├── WorkspaceSettings.xcsettings │ │ │ │ └── IDEWorkspaceChecks.plist │ │ └── xcshareddata │ │ │ └── xcschemes │ │ │ └── Runner.xcscheme │ ├── Runner.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcshareddata │ │ │ ├── WorkspaceSettings.xcsettings │ │ │ └── IDEWorkspaceChecks.plist │ ├── .gitignore │ └── Podfile ├── assets │ ├── canardo.png │ └── samples │ │ ├── sample.aac │ │ ├── sample.caf │ │ ├── sample.mp3 │ │ ├── sample.ogg │ │ ├── sample.opus │ │ └── sample.wav ├── res │ └── icons │ │ ├── AppIcon.png │ │ ├── ic_mic.png │ │ ├── ic_play.png │ │ ├── ic_stop.png │ │ ├── ic_pause.png │ │ ├── 2.0x │ │ ├── ic_mic.png │ │ ├── ic_play.png │ │ ├── ic_stop.png │ │ ├── ic_pause.png │ │ ├── ic_volume_up.png │ │ └── ic_volume_down.png │ │ ├── 3.0x │ │ ├── ic_mic.png │ │ ├── ic_play.png │ │ ├── ic_stop.png │ │ ├── ic_pause.png │ │ ├── ic_volume_up.png │ │ └── ic_volume_down.png │ │ ├── ic_volume_up.png │ │ ├── ic_volume_down.png │ │ ├── ic_mic_disabled.png │ │ ├── ic_pause_disabled.png │ │ ├── ic_play_disabled.png │ │ └── ic_stop_disabled.png ├── lib │ ├── demo_util │ │ ├── demo_audio_state.dart │ │ ├── demo_player_state.dart │ │ ├── demo_active_codec.dart │ │ ├── demo_asset_player.dart │ │ ├── demo_media_path.dart │ │ ├── track_switched.dart │ │ ├── remote_player.dart │ │ ├── demo_common.dart │ │ ├── recording_player.dart │ │ └── recorder_state.dart │ ├── util │ │ ├── grayed_out.dart │ │ └── enum_helper.dart │ └── main.dart ├── .metadata ├── .vscode │ └── launch.json ├── README.md ├── analysis_options.yaml ├── .gitignore └── test │ └── widget_test.dart ├── example.png ├── SoundsLogo.png ├── .github ├── .gitbook.yaml ├── FUNDING.yml ├── ISSUE_TEMPLATE │ ├── documentation.md │ ├── help-wanted.md │ ├── feature_request.md │ └── bug_report.md └── workflows │ └── stale.yml ├── Logotype primary.png ├── images └── SoundPlayerUI.png ├── doc ├── .gitbook │ └── assets │ │ ├── image (1).png │ │ └── image (1) (1).png ├── platforms │ ├── overview.md │ ├── ios.md │ └── android.md ├── contributing │ ├── logging.md │ ├── debugging.md │ └── overview.md ├── api │ ├── audiosource.md │ ├── downloader.md │ ├── overview.md │ ├── monitoring.md │ ├── ioscategory.md │ ├── mediaformat.md │ ├── soundplayerui.md │ ├── quickplay.md │ └── albums.md ├── installing.md ├── SUMMARY.md ├── etc │ └── migrating-from-flutter-sound.md └── roadmap.md ├── lib ├── src │ ├── version │ │ └── version.g.dart │ ├── util │ │ ├── version.g.dart │ │ ├── recorded_audio.dart │ │ ├── recording_track.dart │ │ └── recording_disposition_manager.dart │ ├── media_format │ │ ├── native_duration_provider.dart │ │ ├── ogg_vorbis_media_format.dart │ │ ├── ogg_opus_media_format.dart │ │ ├── pcm_media_format.dart │ │ ├── mp3_media_format.dart │ │ ├── adts_aac_media_format.dart │ │ ├── cap_opus_media_format.dart │ │ ├── well_know_media_formats.dart │ │ └── native_media_format.dart │ ├── audio_focus.dart │ ├── android │ │ └── android_audio_focus_gain.dart │ ├── ios │ │ ├── ios_session_category_option.dart │ │ ├── ios_session_category.dart │ │ └── ios_session_mode.dart │ ├── ui │ │ ├── local_context.dart │ │ ├── slider_position.dart │ │ ├── grayed_out.dart │ │ ├── tick_builder.dart │ │ └── slider.dart │ ├── quality.dart │ ├── recording_disposition.dart │ ├── audio_source.dart │ └── plugins │ │ └── sound_player_plugin.dart ├── main.dart └── sounds.dart ├── workspace.code-workspace ├── issue_template.md ├── .metadata ├── test ├── start_player_test.dart ├── sounds_test.dart ├── sound_player_plugin_e2e.dart └── log10_test.dart ├── tool ├── .flutter-plugins └── .flutter-plugins-dependencies ├── .gitignore ├── pubspec.yaml └── .vscode └── settings.json /ios/Assets/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /android/settings.gradle: -------------------------------------------------------------------------------- 1 | rootProject.name = 'sounds' 2 | -------------------------------------------------------------------------------- /example/android/settings_aar.gradle: -------------------------------------------------------------------------------- 1 | include ':app' 2 | -------------------------------------------------------------------------------- /example.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsutton/sounds/HEAD/example.png -------------------------------------------------------------------------------- /SoundsLogo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsutton/sounds/HEAD/SoundsLogo.png -------------------------------------------------------------------------------- /example/ios/Runner/Runner-Bridging-Header.h: -------------------------------------------------------------------------------- 1 | #import "GeneratedPluginRegistrant.h" 2 | -------------------------------------------------------------------------------- /.github/.gitbook.yaml: -------------------------------------------------------------------------------- 1 | root: ./doc/ 2 | 3 | ​structure: 4 | readme: ../README.md 5 | -------------------------------------------------------------------------------- /Logotype primary.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsutton/sounds/HEAD/Logotype primary.png -------------------------------------------------------------------------------- /images/SoundPlayerUI.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsutton/sounds/HEAD/images/SoundPlayerUI.png -------------------------------------------------------------------------------- /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | # These are supported funding model platforms 2 | 3 | github: [bsutton] 4 | 5 | -------------------------------------------------------------------------------- /example/assets/canardo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsutton/sounds/HEAD/example/assets/canardo.png -------------------------------------------------------------------------------- /example/res/icons/AppIcon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsutton/sounds/HEAD/example/res/icons/AppIcon.png -------------------------------------------------------------------------------- /example/res/icons/ic_mic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsutton/sounds/HEAD/example/res/icons/ic_mic.png -------------------------------------------------------------------------------- /example/res/icons/ic_play.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsutton/sounds/HEAD/example/res/icons/ic_play.png -------------------------------------------------------------------------------- /example/res/icons/ic_stop.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsutton/sounds/HEAD/example/res/icons/ic_stop.png -------------------------------------------------------------------------------- /example/res/icons/ic_pause.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsutton/sounds/HEAD/example/res/icons/ic_pause.png -------------------------------------------------------------------------------- /doc/.gitbook/assets/image (1).png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsutton/sounds/HEAD/doc/.gitbook/assets/image (1).png -------------------------------------------------------------------------------- /example/assets/samples/sample.aac: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsutton/sounds/HEAD/example/assets/samples/sample.aac -------------------------------------------------------------------------------- /example/assets/samples/sample.caf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsutton/sounds/HEAD/example/assets/samples/sample.caf -------------------------------------------------------------------------------- /example/assets/samples/sample.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsutton/sounds/HEAD/example/assets/samples/sample.mp3 -------------------------------------------------------------------------------- /example/assets/samples/sample.ogg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsutton/sounds/HEAD/example/assets/samples/sample.ogg -------------------------------------------------------------------------------- /example/assets/samples/sample.opus: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsutton/sounds/HEAD/example/assets/samples/sample.opus -------------------------------------------------------------------------------- /example/assets/samples/sample.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsutton/sounds/HEAD/example/assets/samples/sample.wav -------------------------------------------------------------------------------- /example/res/icons/2.0x/ic_mic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsutton/sounds/HEAD/example/res/icons/2.0x/ic_mic.png -------------------------------------------------------------------------------- /example/res/icons/2.0x/ic_play.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsutton/sounds/HEAD/example/res/icons/2.0x/ic_play.png -------------------------------------------------------------------------------- /example/res/icons/2.0x/ic_stop.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsutton/sounds/HEAD/example/res/icons/2.0x/ic_stop.png -------------------------------------------------------------------------------- /example/res/icons/3.0x/ic_mic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsutton/sounds/HEAD/example/res/icons/3.0x/ic_mic.png -------------------------------------------------------------------------------- /example/res/icons/3.0x/ic_play.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsutton/sounds/HEAD/example/res/icons/3.0x/ic_play.png -------------------------------------------------------------------------------- /example/res/icons/3.0x/ic_stop.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsutton/sounds/HEAD/example/res/icons/3.0x/ic_stop.png -------------------------------------------------------------------------------- /example/res/icons/ic_volume_up.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsutton/sounds/HEAD/example/res/icons/ic_volume_up.png -------------------------------------------------------------------------------- /example/res/icons/2.0x/ic_pause.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsutton/sounds/HEAD/example/res/icons/2.0x/ic_pause.png -------------------------------------------------------------------------------- /example/res/icons/3.0x/ic_pause.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsutton/sounds/HEAD/example/res/icons/3.0x/ic_pause.png -------------------------------------------------------------------------------- /example/res/icons/ic_volume_down.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsutton/sounds/HEAD/example/res/icons/ic_volume_down.png -------------------------------------------------------------------------------- /doc/.gitbook/assets/image (1) (1).png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsutton/sounds/HEAD/doc/.gitbook/assets/image (1) (1).png -------------------------------------------------------------------------------- /example/res/icons/2.0x/ic_volume_up.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsutton/sounds/HEAD/example/res/icons/2.0x/ic_volume_up.png -------------------------------------------------------------------------------- /example/res/icons/3.0x/ic_volume_up.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsutton/sounds/HEAD/example/res/icons/3.0x/ic_volume_up.png -------------------------------------------------------------------------------- /example/res/icons/ic_mic_disabled.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsutton/sounds/HEAD/example/res/icons/ic_mic_disabled.png -------------------------------------------------------------------------------- /example/res/icons/ic_pause_disabled.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsutton/sounds/HEAD/example/res/icons/ic_pause_disabled.png -------------------------------------------------------------------------------- /example/res/icons/ic_play_disabled.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsutton/sounds/HEAD/example/res/icons/ic_play_disabled.png -------------------------------------------------------------------------------- /example/res/icons/ic_stop_disabled.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsutton/sounds/HEAD/example/res/icons/ic_stop_disabled.png -------------------------------------------------------------------------------- /ios/Classes/SoundsPlugin.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | @interface SoundsPlugin : NSObject 4 | @end 5 | -------------------------------------------------------------------------------- /android/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | BackgroundAudio 3 | 4 | -------------------------------------------------------------------------------- /example/res/icons/2.0x/ic_volume_down.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsutton/sounds/HEAD/example/res/icons/2.0x/ic_volume_down.png -------------------------------------------------------------------------------- /example/res/icons/3.0x/ic_volume_down.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsutton/sounds/HEAD/example/res/icons/3.0x/ic_volume_down.png -------------------------------------------------------------------------------- /lib/src/version/version.g.dart: -------------------------------------------------------------------------------- 1 | /// GENERATED BY pub_release do not modify. 2 | /// sounds version 3 | String packageVersion = '1.0.0'; 4 | -------------------------------------------------------------------------------- /android/.gitignore: -------------------------------------------------------------------------------- 1 | *.iml 2 | .gradle 3 | /local.properties 4 | /.idea/workspace.xml 5 | /.idea/libraries 6 | .DS_Store 7 | /build 8 | /captures 9 | -------------------------------------------------------------------------------- /android/src/main/res/drawable-hdpi/ic_pause.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsutton/sounds/HEAD/android/src/main/res/drawable-hdpi/ic_pause.png -------------------------------------------------------------------------------- /android/src/main/res/drawable-mdpi/ic_pause.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsutton/sounds/HEAD/android/src/main/res/drawable-mdpi/ic_pause.png -------------------------------------------------------------------------------- /android/src/main/res/drawable-xhdpi/ic_pause.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsutton/sounds/HEAD/android/src/main/res/drawable-xhdpi/ic_pause.png -------------------------------------------------------------------------------- /android/src/main/res/drawable-xxhdpi/ic_pause.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsutton/sounds/HEAD/android/src/main/res/drawable-xxhdpi/ic_pause.png -------------------------------------------------------------------------------- /android/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsutton/sounds/HEAD/android/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsutton/sounds/HEAD/android/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsutton/sounds/HEAD/android/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /example/android/app/src/main/samples/sample.aac: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsutton/sounds/HEAD/example/android/app/src/main/samples/sample.aac -------------------------------------------------------------------------------- /example/android/app/src/main/samples/sample.caf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsutton/sounds/HEAD/example/android/app/src/main/samples/sample.caf -------------------------------------------------------------------------------- /example/android/app/src/main/samples/sample.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsutton/sounds/HEAD/example/android/app/src/main/samples/sample.mp3 -------------------------------------------------------------------------------- /example/android/app/src/main/samples/sample.ogg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsutton/sounds/HEAD/example/android/app/src/main/samples/sample.ogg -------------------------------------------------------------------------------- /example/android/app/src/main/samples/sample.opus: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsutton/sounds/HEAD/example/android/app/src/main/samples/sample.opus -------------------------------------------------------------------------------- /example/android/app/src/main/samples/sample.pcm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsutton/sounds/HEAD/example/android/app/src/main/samples/sample.pcm -------------------------------------------------------------------------------- /example/ios/Flutter/Debug.xcconfig: -------------------------------------------------------------------------------- 1 | #include "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig" 2 | #include "Generated.xcconfig" 3 | -------------------------------------------------------------------------------- /lib/src/util/version.g.dart: -------------------------------------------------------------------------------- 1 | /// GENERATED BY Sounds tool/release.dart do not modify. 2 | /// Sounds version 3 | String soundsVersion = '0.8.2'; 4 | -------------------------------------------------------------------------------- /android/src/main/res/drawable-xxxhdpi/ic_pause.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsutton/sounds/HEAD/android/src/main/res/drawable-xxxhdpi/ic_pause.png -------------------------------------------------------------------------------- /android/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsutton/sounds/HEAD/android/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsutton/sounds/HEAD/android/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /example/android/gradle.properties: -------------------------------------------------------------------------------- 1 | org.gradle.jvmargs=-Xmx1536M 2 | android.useAndroidX=true 3 | android.enableJetifier=true 4 | android.enableR8=true 5 | -------------------------------------------------------------------------------- /example/ios/Flutter/Release.xcconfig: -------------------------------------------------------------------------------- 1 | #include "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig" 2 | #include "Generated.xcconfig" 3 | -------------------------------------------------------------------------------- /android/src/main/res/drawable-hdpi/ic_play_arrow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsutton/sounds/HEAD/android/src/main/res/drawable-hdpi/ic_play_arrow.png -------------------------------------------------------------------------------- /android/src/main/res/drawable-hdpi/ic_skip_next_on.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsutton/sounds/HEAD/android/src/main/res/drawable-hdpi/ic_skip_next_on.png -------------------------------------------------------------------------------- /android/src/main/res/drawable-hdpi/ic_skip_prev_on.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsutton/sounds/HEAD/android/src/main/res/drawable-hdpi/ic_skip_prev_on.png -------------------------------------------------------------------------------- /android/src/main/res/drawable-mdpi/ic_play_arrow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsutton/sounds/HEAD/android/src/main/res/drawable-mdpi/ic_play_arrow.png -------------------------------------------------------------------------------- /android/src/main/res/drawable-mdpi/ic_skip_next_on.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsutton/sounds/HEAD/android/src/main/res/drawable-mdpi/ic_skip_next_on.png -------------------------------------------------------------------------------- /android/src/main/res/drawable-mdpi/ic_skip_prev_on.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsutton/sounds/HEAD/android/src/main/res/drawable-mdpi/ic_skip_prev_on.png -------------------------------------------------------------------------------- /android/src/main/res/drawable-xhdpi/ic_play_arrow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsutton/sounds/HEAD/android/src/main/res/drawable-xhdpi/ic_play_arrow.png -------------------------------------------------------------------------------- /android/src/main/res/drawable-xxhdpi/ic_play_arrow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsutton/sounds/HEAD/android/src/main/res/drawable-xxhdpi/ic_play_arrow.png -------------------------------------------------------------------------------- /android/src/main/res/raw/warner_tautz_off_broadway.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsutton/sounds/HEAD/android/src/main/res/raw/warner_tautz_off_broadway.mp3 -------------------------------------------------------------------------------- /android/src/main/res/drawable-hdpi/ic_skip_next_off.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsutton/sounds/HEAD/android/src/main/res/drawable-hdpi/ic_skip_next_off.png -------------------------------------------------------------------------------- /android/src/main/res/drawable-hdpi/ic_skip_prev_off.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsutton/sounds/HEAD/android/src/main/res/drawable-hdpi/ic_skip_prev_off.png -------------------------------------------------------------------------------- /android/src/main/res/drawable-mdpi/ic_skip_next_off.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsutton/sounds/HEAD/android/src/main/res/drawable-mdpi/ic_skip_next_off.png -------------------------------------------------------------------------------- /android/src/main/res/drawable-mdpi/ic_skip_prev_off.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsutton/sounds/HEAD/android/src/main/res/drawable-mdpi/ic_skip_prev_off.png -------------------------------------------------------------------------------- /android/src/main/res/drawable-xhdpi/ic_skip_next_off.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsutton/sounds/HEAD/android/src/main/res/drawable-xhdpi/ic_skip_next_off.png -------------------------------------------------------------------------------- /android/src/main/res/drawable-xhdpi/ic_skip_next_on.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsutton/sounds/HEAD/android/src/main/res/drawable-xhdpi/ic_skip_next_on.png -------------------------------------------------------------------------------- /android/src/main/res/drawable-xhdpi/ic_skip_prev_off.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsutton/sounds/HEAD/android/src/main/res/drawable-xhdpi/ic_skip_prev_off.png -------------------------------------------------------------------------------- /android/src/main/res/drawable-xhdpi/ic_skip_prev_on.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsutton/sounds/HEAD/android/src/main/res/drawable-xhdpi/ic_skip_prev_on.png -------------------------------------------------------------------------------- /android/src/main/res/drawable-xxhdpi/ic_skip_next_on.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsutton/sounds/HEAD/android/src/main/res/drawable-xxhdpi/ic_skip_next_on.png -------------------------------------------------------------------------------- /android/src/main/res/drawable-xxhdpi/ic_skip_prev_on.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsutton/sounds/HEAD/android/src/main/res/drawable-xxhdpi/ic_skip_prev_on.png -------------------------------------------------------------------------------- /android/src/main/res/drawable-xxxhdpi/ic_play_arrow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsutton/sounds/HEAD/android/src/main/res/drawable-xxxhdpi/ic_play_arrow.png -------------------------------------------------------------------------------- /doc/platforms/overview.md: -------------------------------------------------------------------------------- 1 | # Overview 2 | 3 | This section provides details on the specific configuration required for each of the supported platforms. 4 | 5 | -------------------------------------------------------------------------------- /android/src/main/res/drawable-xxhdpi/ic_skip_next_off.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsutton/sounds/HEAD/android/src/main/res/drawable-xxhdpi/ic_skip_next_off.png -------------------------------------------------------------------------------- /android/src/main/res/drawable-xxhdpi/ic_skip_prev_off.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsutton/sounds/HEAD/android/src/main/res/drawable-xxhdpi/ic_skip_prev_off.png -------------------------------------------------------------------------------- /android/src/main/res/drawable-xxxhdpi/ic_skip_next_off.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsutton/sounds/HEAD/android/src/main/res/drawable-xxxhdpi/ic_skip_next_off.png -------------------------------------------------------------------------------- /android/src/main/res/drawable-xxxhdpi/ic_skip_next_on.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsutton/sounds/HEAD/android/src/main/res/drawable-xxxhdpi/ic_skip_next_on.png -------------------------------------------------------------------------------- /android/src/main/res/drawable-xxxhdpi/ic_skip_prev_off.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsutton/sounds/HEAD/android/src/main/res/drawable-xxxhdpi/ic_skip_prev_off.png -------------------------------------------------------------------------------- /android/src/main/res/drawable-xxxhdpi/ic_skip_prev_on.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsutton/sounds/HEAD/android/src/main/res/drawable-xxxhdpi/ic_skip_prev_on.png -------------------------------------------------------------------------------- /example/android/.gitignore: -------------------------------------------------------------------------------- 1 | gradle-wrapper.jar 2 | /.gradle 3 | /captures/ 4 | /gradlew 5 | /gradlew.bat 6 | /local.properties 7 | GeneratedPluginRegistrant.java 8 | -------------------------------------------------------------------------------- /example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsutton/sounds/HEAD/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsutton/sounds/HEAD/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsutton/sounds/HEAD/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/gradle.properties: -------------------------------------------------------------------------------- 1 | org.gradle.jvmargs=-Xmx1536M 2 | android.enableD8=true 3 | android.useAndroidX=true 4 | android.enableJetifier=true 5 | 6 | android.enableR8=true 7 | -------------------------------------------------------------------------------- /example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsutton/sounds/HEAD/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsutton/sounds/HEAD/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsutton/sounds/HEAD/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsutton/sounds/HEAD/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsutton/sounds/HEAD/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsutton/sounds/HEAD/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsutton/sounds/HEAD/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsutton/sounds/HEAD/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsutton/sounds/HEAD/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsutton/sounds/HEAD/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsutton/sounds/HEAD/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsutton/sounds/HEAD/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsutton/sounds/HEAD/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsutton/sounds/HEAD/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsutton/sounds/HEAD/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsutton/sounds/HEAD/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsutton/sounds/HEAD/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsutton/sounds/HEAD/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsutton/sounds/HEAD/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsutton/sounds/HEAD/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x-1.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsutton/sounds/HEAD/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x-1.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsutton/sounds/HEAD/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x-2.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsutton/sounds/HEAD/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x-2.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x-3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsutton/sounds/HEAD/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x-3.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsutton/sounds/HEAD/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x-1.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsutton/sounds/HEAD/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x-2.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsutton/sounds/HEAD/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x-1.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsutton/sounds/HEAD/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x-2.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsutton/sounds/HEAD/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsutton/sounds/HEAD/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x-1.png -------------------------------------------------------------------------------- /workspace.code-workspace: -------------------------------------------------------------------------------- 1 | { 2 | "folders": [ 3 | { 4 | "path": "." 5 | }, 6 | { 7 | "path": "../sounds_common" 8 | } 9 | ], 10 | "settings": { 11 | "debug.openDebug": "openOnDebugBreak" 12 | } 13 | } -------------------------------------------------------------------------------- /doc/contributing/logging.md: -------------------------------------------------------------------------------- 1 | # Logging 2 | 3 | The default logging level is info. The following code edits the static property 'loggingLevel' which sets your global logging level. 4 | 5 | ```text 6 | Log.loggingLevel = Level.warning; 7 | ``` 8 | 9 | -------------------------------------------------------------------------------- /example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /example/android/app/src/profile/gen/com/example/example/R.java: -------------------------------------------------------------------------------- 1 | /*___Generated_by_IDEA___*/ 2 | 3 | package com.example.example; 4 | 5 | /* This stub is only used by the IDE. It is NOT the R class actually packed into the APK */ 6 | public final class R { 7 | } -------------------------------------------------------------------------------- /lib/main.dart: -------------------------------------------------------------------------------- 1 | import 'package:sounds_common/sounds_common.dart'; 2 | 3 | /// This file exists to make AndroidStudio happy. 4 | /// With out this file builds will fail. 5 | 6 | void main() { 7 | Log.e('This should never be called as its a dummy'); 8 | } 9 | -------------------------------------------------------------------------------- /android/src/main/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #3F51B5 4 | #303F9F 5 | #FF4081 6 | 7 | -------------------------------------------------------------------------------- /android/src/main/res/values/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 16dp 4 | 16dp 5 | 6 | -------------------------------------------------------------------------------- /example/android/app/src/debug/gen/com/bsutton/sounds/example/R.java: -------------------------------------------------------------------------------- 1 | /*___Generated_by_IDEA___*/ 2 | 3 | package com.bsutton.sounds.example; 4 | 5 | /* This stub is only used by the IDE. It is NOT the R class actually packed into the APK */ 6 | public final class R { 7 | } -------------------------------------------------------------------------------- /example/android/app/src/main/gen/com/bsutton/sounds/example/R.java: -------------------------------------------------------------------------------- 1 | /*___Generated_by_IDEA___*/ 2 | 3 | package com.bsutton.sounds.example; 4 | 5 | /* This stub is only used by the IDE. It is NOT the R class actually packed into the APK */ 6 | public final class R { 7 | } -------------------------------------------------------------------------------- /example/android/app/src/profile/gen/com/example/example/Manifest.java: -------------------------------------------------------------------------------- 1 | /*___Generated_by_IDEA___*/ 2 | 3 | package com.example.example; 4 | 5 | /* This stub is only used by the IDE. It is NOT the Manifest class actually packed into the APK */ 6 | public final class Manifest { 7 | } -------------------------------------------------------------------------------- /example/android/app/src/main/gen/com/bsutton/sounds/example/Manifest.java: -------------------------------------------------------------------------------- 1 | /*___Generated_by_IDEA___*/ 2 | 3 | package com.bsutton.sounds.example; 4 | 5 | /* This stub is only used by the IDE. It is NOT the Manifest class actually packed into the APK */ 6 | public final class Manifest { 7 | } -------------------------------------------------------------------------------- /example/android/app/src/debug/gen/com/bsutton/sounds/example/Manifest.java: -------------------------------------------------------------------------------- 1 | /*___Generated_by_IDEA___*/ 2 | 3 | package com.bsutton.sounds.example; 4 | 5 | /* This stub is only used by the IDE. It is NOT the Manifest class actually packed into the APK */ 6 | public final class Manifest { 7 | } -------------------------------------------------------------------------------- /example/lib/demo_util/demo_audio_state.dart: -------------------------------------------------------------------------------- 1 | /// Used to track the State of the UI 2 | enum AudioState { 3 | /// 4 | isStopped, 5 | 6 | /// 7 | isPlaying, 8 | 9 | /// 10 | isPaused, 11 | 12 | /// 13 | isRecording, 14 | 15 | /// 16 | isRecordingPaused, 17 | } 18 | -------------------------------------------------------------------------------- /example/android/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Wed Mar 10 09:45:46 AEDT 2021 2 | distributionBase=GRADLE_USER_HOME 3 | distributionPath=wrapper/dists 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | distributionUrl=https\://services.gradle.org/distributions/gradle-6.5-all.zip 7 | -------------------------------------------------------------------------------- /issue_template.md: -------------------------------------------------------------------------------- 1 | ### Version of sounds 2 | 3 | ## flutter doctor 4 | 5 | ### Platforms you faced the error (IOS or Android or both?) 6 | 7 | ### Expected behavior 8 | 9 | ### Actual behavior 10 | 11 | ### Tested environment (Emulator? Real Device?) 12 | 13 | ### Steps to reproduce the behavior 14 | -------------------------------------------------------------------------------- /example/ios/Runner.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /example/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreviewsEnabled 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /example/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreviewsEnabled 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/documentation.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Documentation 3 | about: Documentation update requested 4 | title: '' 5 | labels: doc 6 | assignees: '' 7 | 8 | --- 9 | 10 | - Is the documentation wrong ? 11 | 12 | - Is the documentation inaccurate ? 13 | 14 | - Is the documentation missing for a specific object ? 15 | 16 | - Other ? 17 | -------------------------------------------------------------------------------- /example/android/app/src/profile/gen/com/example/example/BuildConfig.java: -------------------------------------------------------------------------------- 1 | /*___Generated_by_IDEA___*/ 2 | 3 | package com.example.example; 4 | 5 | /* This stub is only used by the IDE. It is NOT the BuildConfig class actually packed into the APK */ 6 | public final class BuildConfig { 7 | public final static boolean DEBUG = Boolean.parseBoolean(null); 8 | } -------------------------------------------------------------------------------- /.metadata: -------------------------------------------------------------------------------- 1 | # This file tracks properties of this Flutter project. 2 | # Used by Flutter tool to assess capabilities and perform upgrades etc. 3 | # 4 | # This file should be version controlled and should not be manually edited. 5 | 6 | version: 7 | revision: 60bd88df915880d23877bfc1602e8ddcf4c4dd2a 8 | channel: stable 9 | 10 | project_type: plugin 11 | -------------------------------------------------------------------------------- /example/.metadata: -------------------------------------------------------------------------------- 1 | # This file tracks properties of this Flutter project. 2 | # Used by Flutter tool to assess capabilities and perform upgrades etc. 3 | # 4 | # This file should be version controlled and should not be manually edited. 5 | 6 | version: 7 | revision: 5b0a79dbdbe77fe23306df5359d88f81ac0255e4 8 | channel: master 9 | 10 | project_type: app 11 | -------------------------------------------------------------------------------- /example/android/app/src/debug/gen/com/bsutton/sounds/example/BuildConfig.java: -------------------------------------------------------------------------------- 1 | /*___Generated_by_IDEA___*/ 2 | 3 | package com.bsutton.sounds.example; 4 | 5 | /* This stub is only used by the IDE. It is NOT the BuildConfig class actually packed into the APK */ 6 | public final class BuildConfig { 7 | public final static boolean DEBUG = Boolean.parseBoolean(null); 8 | } -------------------------------------------------------------------------------- /example/android/app/src/main/gen/com/bsutton/sounds/example/BuildConfig.java: -------------------------------------------------------------------------------- 1 | /*___Generated_by_IDEA___*/ 2 | 3 | package com.bsutton.sounds.example; 4 | 5 | /* This stub is only used by the IDE. It is NOT the BuildConfig class actually packed into the APK */ 6 | public final class BuildConfig { 7 | public final static boolean DEBUG = Boolean.parseBoolean(null); 8 | } -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md: -------------------------------------------------------------------------------- 1 | # Launch Screen Assets 2 | 3 | You can customize the launch screen with your own desired assets by replacing the image files in this directory. 4 | 5 | You can also do it by opening your Flutter project's Xcode project with `open ios/Runner.xcworkspace`, selecting `Runner/Assets.xcassets` in the Project Navigator and dropping in the desired images. -------------------------------------------------------------------------------- /test/start_player_test.dart: -------------------------------------------------------------------------------- 1 | // import 'package:flutter/services.dart'; 2 | import 'package:flutter/widgets.dart'; 3 | import 'package:sounds/sounds.dart'; 4 | // import 'package:flutter_test/flutter_test.dart'; 5 | 6 | void main() { 7 | WidgetsFlutterBinding.ensureInitialized(); 8 | 9 | // final log = []; 10 | 11 | QuickPlay.fromFile('example/asset/samples/sample.acc'); 12 | } 13 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/help-wanted.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Help wanted 3 | about: Does someone can answer? 4 | title: "[HELP]" 5 | labels: help wanted 6 | assignees: '' 7 | 8 | --- 9 | 10 | I need Help for : 11 | 12 | - Using the API ? 13 | 14 | - Generate an iOS or Android App ? 15 | 16 | - Debugging my App ? 17 | 18 | - Other ? 19 | 20 | ------------------------------------- 21 | ## Here is my question : 22 | -------------------------------------------------------------------------------- /android/src/main/res/values-w820dp/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 64dp 6 | 7 | -------------------------------------------------------------------------------- /example/.vscode/launch.json: -------------------------------------------------------------------------------- 1 | { 2 | // Use IntelliSense to learn about possible attributes. 3 | // Hover to view descriptions of existing attributes. 4 | // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 5 | "version": "0.2.0", 6 | "configurations": [ 7 | { 8 | "name": "Flutter", 9 | "request": "launch", 10 | "type": "dart" 11 | } 12 | ] 13 | } -------------------------------------------------------------------------------- /android/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /doc/contributing/debugging.md: -------------------------------------------------------------------------------- 1 | # Debugging 2 | 3 | ## Overview 4 | 5 | When you face the following error, 6 | 7 | ```text 8 | * What went wrong: 9 | A problem occurred evaluating project ':app'. 10 | > versionCode not found. Define flutter.versionCode in the local.properties file. 11 | ``` 12 | 13 | Please add below to your `example/android/local.properties` file. 14 | 15 | ```text 16 | flutter.versionName=1.0.0 17 | flutter.versionCode=1 18 | flutter.buildMode=debug 19 | ``` 20 | 21 | -------------------------------------------------------------------------------- /example/ios/Runner/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | import UIKit 2 | import Flutter 3 | 4 | @UIApplicationMain 5 | @objc class AppDelegate: FlutterAppDelegate { 6 | override func application( 7 | _ application: UIApplication, 8 | didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? 9 | ) -> Bool { 10 | GeneratedPluginRegistrant.register(with: self) 11 | return super.application(application, didFinishLaunchingWithOptions: launchOptions) 12 | } 13 | } 14 | 15 | -------------------------------------------------------------------------------- /tool/.flutter-plugins: -------------------------------------------------------------------------------- 1 | # This is a generated file; do not edit or check into version control. 2 | e2e=/home/bsutton/apps/flutter/.pub-cache/hosted/pub.dartlang.org/e2e-0.5.0/ 3 | ext_storage=/home/bsutton/apps/flutter/.pub-cache/hosted/pub.dartlang.org/ext_storage-1.0.3/ 4 | path_provider=/home/bsutton/apps/flutter/.pub-cache/hosted/pub.dartlang.org/path_provider-1.6.9/ 5 | path_provider_macos=/home/bsutton/apps/flutter/.pub-cache/hosted/pub.dartlang.org/path_provider_macos-0.0.4+3/ 6 | tools=/home/bsutton/git/sounds/tool/ 7 | -------------------------------------------------------------------------------- /doc/platforms/ios.md: -------------------------------------------------------------------------------- 1 | # iOS 2 | 3 | ## Overview 4 | 5 | Once you have added the `Sounds` dependency to you pubspec.yaml you need to modify your iOS `info.plist` file. 6 | 7 | You need to set an appropriate message for the `NSMicrophoneUsageDescription` field. 8 | 9 | ```text 10 | NSMicrophoneUsageDescription 11 | My app uses the microphone to record your speech and convert it to text. 12 | UIBackgroundModes 13 | 14 | audio 15 | 16 | ``` 17 | 18 | -------------------------------------------------------------------------------- /example/android/app/src/main/res/drawable/launch_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 12 | 13 | -------------------------------------------------------------------------------- /ios/.gitignore: -------------------------------------------------------------------------------- 1 | .idea/ 2 | .vagrant/ 3 | .sconsign.dblite 4 | .svn/ 5 | 6 | .DS_Store 7 | *.swp 8 | profile 9 | 10 | DerivedData/ 11 | build/ 12 | GeneratedPluginRegistrant.h 13 | GeneratedPluginRegistrant.m 14 | 15 | .generated/ 16 | 17 | *.pbxuser 18 | *.mode1v3 19 | *.mode2v3 20 | *.perspectivev3 21 | 22 | !default.pbxuser 23 | !default.mode1v3 24 | !default.mode2v3 25 | !default.perspectivev3 26 | 27 | xcuserdata 28 | 29 | *.moved-aside 30 | 31 | *.pyc 32 | *sync/ 33 | Icon? 34 | .tags* 35 | 36 | /Flutter/Generated.xcconfig 37 | -------------------------------------------------------------------------------- /example/android/app/src/main/res/drawable-v21/launch_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 12 | 13 | -------------------------------------------------------------------------------- /test/sounds_test.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/services.dart'; 2 | import 'package:flutter_test/flutter_test.dart'; 3 | 4 | void main() { 5 | const channel = MethodChannel('sounds'); 6 | 7 | TestWidgetsFlutterBinding.ensureInitialized(); 8 | 9 | setUp(() { 10 | channel.setMockMethodCallHandler((methodCall) async => '42'); 11 | }); 12 | 13 | tearDown(() { 14 | channel.setMockMethodCallHandler(null); 15 | }); 16 | 17 | test('getPlatformVersion', () async { 18 | // expect(await Sounds.platformVersion, '42'); 19 | }); 20 | } 21 | -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "LaunchImage.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "LaunchImage@2x.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "LaunchImage@3x.png", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /example/android/app/src/debug/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /lib/src/util/recorded_audio.dart: -------------------------------------------------------------------------------- 1 | import 'package:sounds_common/sounds_common.dart'; 2 | 3 | /// [RecordedAudio] is used to track the audio media 4 | /// created during a recording session via the SoundRecorderUI. 5 | /// 6 | class RecordedAudio { 7 | /// Creates a [RecordedAudio] that will store 8 | /// the recording to the given track. 9 | RecordedAudio.recordTo(this.track); 10 | 11 | /// The length of the recording (so far) 12 | Duration duration = Duration.zero; 13 | 14 | /// The track we are recording audio intto. 15 | Track track; 16 | } 17 | -------------------------------------------------------------------------------- /example/android/app/src/profile/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /example/android/app/src/androidTest/java/soundPlayerPlugin/EmbeddingV1ActivityTest.java: -------------------------------------------------------------------------------- 1 | package io.flutter.plugins.firebase.core; 2 | 3 | import androidx.test.rule.ActivityTestRule; 4 | import dev.flutter.plugins.e2e.FlutterRunner; 5 | import io.flutter.plugins.firebasecoreexample.EmbeddingV1Activity; 6 | import org.junit.Rule; 7 | import org.junit.runner.RunWith; 8 | 9 | @RunWith(FlutterRunner.class) 10 | public class EmbeddingV1ActivityTest { 11 | @Rule 12 | public ActivityTestRule rule = new ActivityTestRule<>(EmbeddingV1Activity.class); 13 | } -------------------------------------------------------------------------------- /example/android/settings.gradle: -------------------------------------------------------------------------------- 1 | include ':app' 2 | 3 | def flutterProjectRoot = rootProject.projectDir.parentFile.toPath() 4 | 5 | def plugins = new Properties() 6 | def pluginsFile = new File(flutterProjectRoot.toFile(), '.flutter-plugins') 7 | if (pluginsFile.exists()) { 8 | pluginsFile.withReader('UTF-8') { reader -> plugins.load(reader) } 9 | } 10 | 11 | plugins.each { name, path -> 12 | def pluginDirectory = flutterProjectRoot.resolve(path).resolve('android').toFile() 13 | include ":$name" 14 | project(":$name").projectDir = pluginDirectory 15 | } 16 | -------------------------------------------------------------------------------- /doc/api/audiosource.md: -------------------------------------------------------------------------------- 1 | # AudioSource 2 | 3 | When recording the AudioSource class defines the what where the audio is capture from. 4 | 5 | The following sources are supported: 6 | 7 | Note: not all sources are supported on all devices or platforms. 8 | 9 | | Source | Description | 10 | | :--- | :--- | 11 | | defaultSource | | 12 | | mic | The microphone. | 13 | | voiceUplink | | 14 | | voiceDownlink | | 15 | | camcorder | | 16 | | voiceRecognition | | 17 | | voiceCommunication | | 18 | | remoteSubmix | | 19 | | unprocessed | | 20 | | radioTuner | | 21 | | hotword | | 22 | 23 | -------------------------------------------------------------------------------- /example/README.md: -------------------------------------------------------------------------------- 1 | # example 2 | 3 | A new Flutter project. 4 | 5 | ## Getting Started 6 | 7 | This project is a starting point for a Flutter application. 8 | 9 | A few resources to get you started if this is your first Flutter project: 10 | 11 | - [Lab: Write your first Flutter app](https://flutter.dev/docs/get-started/codelab) 12 | - [Cookbook: Useful Flutter samples](https://flutter.dev/docs/cookbook) 13 | 14 | For help getting started with Flutter, view our 15 | [online documentation](https://flutter.dev/docs), which offers tutorials, 16 | samples, guidance on mobile development, and a full API reference. 17 | -------------------------------------------------------------------------------- /ios/Classes/SoundsPlugin.m: -------------------------------------------------------------------------------- 1 | #import "SoundsPlugin.h" 2 | #if __has_include() 3 | #import 4 | #else 5 | // Support project import fallback if the generated compatibility header 6 | // is not copied when this plugin is created as a library. 7 | // https://forums.swift.org/t/swift-static-libraries-dont-copy-generated-objective-c-header/19816 8 | #import "sounds-Swift.h" 9 | #endif 10 | 11 | @implementation SoundsPlugin 12 | + (void)registerWithRegistrar:(NSObject*)registrar { 13 | [SwiftSoundsPlugin registerWithRegistrar:registrar]; 14 | } 15 | @end 16 | -------------------------------------------------------------------------------- /android/src/main/java/com/bsutton/sounds/PlayerAudioModel.java: -------------------------------------------------------------------------------- 1 | package com.bsutton.sounds; 2 | 3 | import android.media.MediaPlayer; 4 | 5 | class PlayerAudioModel { 6 | public int progressInterval = 10; 7 | 8 | private MediaPlayer mediaPlayer; 9 | private long playTime = 0; 10 | 11 | public MediaPlayer getMediaPlayer() { 12 | return mediaPlayer; 13 | } 14 | 15 | public void setMediaPlayer(MediaPlayer mediaPlayer) { 16 | this.mediaPlayer = mediaPlayer; 17 | } 18 | 19 | public long getPlayTime() { 20 | return playTime; 21 | } 22 | 23 | public void setPlayTime(long playTime) { 24 | this.playTime = playTime; 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /lib/src/media_format/native_duration_provider.dart: -------------------------------------------------------------------------------- 1 | import '../sound_player.dart'; 2 | 3 | /// Provides a method to determine the duration of a natively supported 4 | /// audio file. 5 | class NativeDurationProvider { 6 | /// 7 | factory NativeDurationProvider() => _self; 8 | 9 | NativeDurationProvider._internal(); 10 | 11 | static final NativeDurationProvider _self = 12 | NativeDurationProvider._internal(); 13 | 14 | /// Returns the duration of the audio file at the given [path] 15 | /// for natively supported MediaFormats. 16 | Future getDuration(String path) async => 17 | SoundPlayer.noUI().duration(path); 18 | } 19 | -------------------------------------------------------------------------------- /doc/platforms/android.md: -------------------------------------------------------------------------------- 1 | # Android 2 | 3 | 4 | 5 | ## Overview 6 | 7 | Once you have added the `Sounds` dependency to you pubspec.yaml you need to modify your Android `AndroidManifest.xml` file. 8 | 9 | Added the following permissions to `AndroidManifest.xml`: 10 | 11 | ```text 12 | 13 | 14 | ``` 15 | 16 | ## MediaFormats 17 | 18 | For a complete list of Audio Codecs supported on Android [https://developer.android.com/guide/topics/media/media-formats](https://developer.android.com/guide/topics/media/media-formats) 19 | 20 | -------------------------------------------------------------------------------- /example/ios/.gitignore: -------------------------------------------------------------------------------- 1 | *.mode1v3 2 | *.mode2v3 3 | *.moved-aside 4 | *.pbxuser 5 | *.perspectivev3 6 | **/*sync/ 7 | .sconsign.dblite 8 | .tags* 9 | **/.vagrant/ 10 | **/DerivedData/ 11 | Icon? 12 | **/Pods/ 13 | **/.symlinks/ 14 | profile 15 | xcuserdata 16 | **/.generated/ 17 | Flutter/App.framework 18 | Flutter/Flutter.framework 19 | Flutter/Flutter.podspec 20 | Flutter/Generated.xcconfig 21 | Flutter/app.flx 22 | Flutter/app.zip 23 | Flutter/flutter_assets/ 24 | Flutter/flutter_export_environment.sh 25 | ServiceDefinitions.json 26 | Runner/GeneratedPluginRegistrant.* 27 | 28 | # Exceptions to above rules. 29 | !default.mode1v3 30 | !default.mode2v3 31 | !default.pbxuser 32 | !default.perspectivev3 33 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/feature_request.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Feature request 3 | about: Suggest an idea for this project 4 | title: '' 5 | labels: enhancement 6 | assignees: '' 7 | 8 | --- 9 | 10 | **Is your feature request related to a problem? Please describe.** 11 | A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] 12 | 13 | **Describe the solution you'd like** 14 | A clear and concise description of what you want to happen. 15 | 16 | **Describe alternatives you've considered** 17 | A clear and concise description of any alternative solutions or features you've considered. 18 | 19 | **Additional context** 20 | Add any other context or screenshots about the feature request here. 21 | -------------------------------------------------------------------------------- /example/analysis_options.yaml: -------------------------------------------------------------------------------- 1 | include: package:pedantic/analysis_options.yaml 2 | # include: package:lint/analysis_options_package.yaml 3 | 4 | # For lint rules and documentation, see http://dart-lang.github.io/linter/lints. 5 | # Uncomment to specify additional rules. 6 | # linter: 7 | 8 | # rules: 9 | # lines_longer_than_80_chars: false 10 | # camel_case_types: true 11 | # always_declare_return_types: true 12 | 13 | # await_only_futures: true 14 | # unawaited_futures: true 15 | # comment_references: true 16 | # avoid_print: false 17 | 18 | 19 | # analyzer: 20 | 21 | # exclude: lib/templates/*.dart 22 | # strong-mode: 23 | # implicit-casts: false 24 | # implicit-dynamic: false 25 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | .dart_tool/ 3 | 4 | .packages 5 | .pub/ 6 | pubspec.lock 7 | 8 | android/gradle 9 | build/ 10 | 11 | .idea/ 12 | sounds.iml 13 | sounds_android.iml 14 | android/.settings/org.eclipse.buildship.core.prefs 15 | .vscode/launch.json 16 | android/.classpath 17 | android/.project 18 | example/android/.project 19 | example/android/.settings/org.eclipse.buildship.core.prefs 20 | example/android/app/.classpath 21 | example/android/app/.project 22 | example/android/app/.settings/org.eclipse.buildship.core.prefs 23 | example/.flutter-plugins* 24 | flutter_export_environment* 25 | .gradle 26 | example/ios/Flutter/.last_build_id 27 | example/ios/Podfile.lock 28 | .last_build_id 29 | Podfile.lock 30 | .history 31 | lib/.history 32 | -------------------------------------------------------------------------------- /example/android/build.gradle: -------------------------------------------------------------------------------- 1 | buildscript { 2 | ext.kotlin_version = '1.3.50' 3 | repositories { 4 | google() 5 | jcenter() 6 | } 7 | 8 | dependencies { 9 | classpath 'com.android.tools.build:gradle:4.1.2' 10 | classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" 11 | } 12 | } 13 | 14 | allprojects { 15 | repositories { 16 | google() 17 | jcenter() 18 | } 19 | } 20 | 21 | rootProject.buildDir = '../build' 22 | subprojects { 23 | project.buildDir = "${rootProject.buildDir}/${project.name}" 24 | } 25 | subprojects { 26 | project.evaluationDependsOn(':app') 27 | } 28 | 29 | task clean(type: Delete) { 30 | delete rootProject.buildDir 31 | } 32 | -------------------------------------------------------------------------------- /.github/workflows/stale.yml: -------------------------------------------------------------------------------- 1 | name: Mark stale issues and pull requests 2 | 3 | on: 4 | schedule: 5 | - cron: "0 0 * * *" 6 | 7 | jobs: 8 | stale: 9 | 10 | runs-on: ubuntu-latest 11 | 12 | steps: 13 | - uses: actions/stale@v1 14 | with: 15 | repo-token: ${{ secrets.GITHUB_TOKEN }} 16 | days-before-stale: 90 17 | days-before-close: 7 18 | stale-issue-message: 'This issue is stale because it has been open 90 days with no activity. Leave a comment or this will be closed in 7 days.' 19 | stale-pr-message: 'This PR is stale because it has been open 90 days with no activity. Leave a comment or this will be closed in 7 days' 20 | stale-issue-label: 'no-issue-activity' 21 | stale-pr-label: 'no-pr-activity' 22 | -------------------------------------------------------------------------------- /lib/src/audio_focus.dart: -------------------------------------------------------------------------------- 1 | /// Used by SoundPlayer.audioFocus 2 | /// to control the focus mode. 3 | enum AudioFocus { 4 | //NOTE auto focus calls hushOthersWithResume and automatically abandons focus 5 | 6 | /// request focus and stop all other audio streams 7 | /// do not resume stream after abandon focus is called. 8 | stopOthersNoResume, 9 | 10 | /// request focus and stop other audio playing 11 | /// resume other audio stream abandon focus is called. 12 | stopOthersWithResume, 13 | 14 | /// request focus and reduce the volume of other players 15 | /// In the Android world this is know as 'Duck Others'. 16 | /// Unhush other audio streams when abandon focus is called 17 | hushOthersWithResume, 18 | 19 | /// relinquish the audio focus. 20 | abandonFocus, 21 | } 22 | -------------------------------------------------------------------------------- /android/src/main/java/com/bsutton/sounds/RecorderAudioModel.java: -------------------------------------------------------------------------------- 1 | package com.bsutton.sounds; 2 | 3 | import android.media.MediaRecorder; 4 | 5 | class RecorderAudioModel { 6 | public int progressIntervalMillis = 800; 7 | private MediaRecorder mediaRecorder; 8 | 9 | // The time at which the current recording was started. 10 | public long startTime; 11 | private long recordTime = 0; 12 | public final double micLevelBase = 2700; 13 | 14 | public MediaRecorder getMediaRecorder() { 15 | return mediaRecorder; 16 | } 17 | 18 | public void setMediaRecorder(MediaRecorder mediaRecorder) { 19 | this.mediaRecorder = mediaRecorder; 20 | } 21 | 22 | public long getRecordTime() { 23 | return recordTime; 24 | } 25 | 26 | public void setRecordTime(long recordTime) { 27 | this.recordTime = recordTime; 28 | } 29 | 30 | } -------------------------------------------------------------------------------- /example/.gitignore: -------------------------------------------------------------------------------- 1 | # Miscellaneous 2 | *.class 3 | *.log 4 | *.pyc 5 | *.swp 6 | .DS_Store 7 | .atom/ 8 | .buildlog/ 9 | .history 10 | .svn/ 11 | 12 | # IntelliJ related 13 | *.iml 14 | *.ipr 15 | *.iws 16 | .idea/ 17 | 18 | # The .vscode folder contains launch configuration and tasks you configure in 19 | # VS Code which you may wish to be included in version control, so this line 20 | # is commented out by default. 21 | #.vscode/ 22 | 23 | # Flutter/Dart/Pub related 24 | **/doc/api/ 25 | .dart_tool/ 26 | .flutter-plugins 27 | .flutter-plugins-dependencies 28 | .packages 29 | .pub-cache/ 30 | .pub/ 31 | /build/ 32 | 33 | # Web related 34 | lib/generated_plugin_registrant.dart 35 | 36 | # Symbolication related 37 | app.*.symbols 38 | 39 | # Obfuscation related 40 | app.*.map.json 41 | 42 | # Exceptions to above rules. 43 | !/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages 44 | -------------------------------------------------------------------------------- /example/ios/Flutter/AppFrameworkInfo.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | App 9 | CFBundleIdentifier 10 | io.flutter.flutter.app 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | App 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1.0 23 | MinimumOSVersion 24 | 8.0 25 | 26 | 27 | -------------------------------------------------------------------------------- /lib/src/media_format/ogg_vorbis_media_format.dart: -------------------------------------------------------------------------------- 1 | import '../../sounds.dart'; 2 | import 'native_media_format.dart'; 3 | 4 | /// The native ogg/vorbis media format. 5 | class OggVorbisMediaFormat extends NativeMediaFormat { 6 | /// ctor 7 | OggVorbisMediaFormat({ 8 | int sampleRate = 16000, 9 | int numChannels = 1, 10 | int bitRate = 16000, 11 | }) : super.detail( 12 | name: 'ogg/vorbis', 13 | sampleRate: sampleRate, 14 | numChannels: numChannels, 15 | bitRate: bitRate, 16 | ); 17 | @override 18 | String get extension => 'ogg'; 19 | 20 | // MediaRecorder.AudioEncoder.VORBIS 21 | @override 22 | int get androidEncoder => 6; 23 | 24 | @override 25 | // MediaRecorder.OutputFormat.OGG added in API level 29 26 | int get androidFormat => 11; 27 | 28 | @override 29 | int get iosFormat => throw MediaFormatException( 30 | 'Ogg/Vorbise recording is not supported on iOS'); 31 | } 32 | -------------------------------------------------------------------------------- /ios/sounds.podspec: -------------------------------------------------------------------------------- 1 | # 2 | # To learn more about a Podspec see http://guides.cocoapods.org/syntax/podspec.html 3 | # Run `pod lib lint sounds.podspec' to validate before publishing. 4 | # 5 | Pod::Spec.new do |s| 6 | s.name = 'sounds' 7 | s.version = '0.0.1' 8 | s.summary = 'Flutter plugin that provides audio recording and playback services.' 9 | s.description = <<-DESC 10 | Flutter plugin that provides audio recording and playback services 11 | DESC 12 | s.homepage = 'http://github.com/bsutton/sounds' 13 | s.license = { :file => '../LICENSE' } 14 | s.author = { 'Sounds' => 'bsutton@noojee.com.au' } 15 | s.source = { :path => '.' } 16 | s.source_files = 'Classes/**/*' 17 | s.public_header_files = 'Classes/**/*.h' 18 | s.dependency 'Flutter' 19 | s.platform = :ios, '10.0' 20 | 21 | s.ios.deployment_target = '10.0' 22 | s.static_framework = true 23 | end 24 | -------------------------------------------------------------------------------- /lib/src/media_format/ogg_opus_media_format.dart: -------------------------------------------------------------------------------- 1 | import 'package:sounds_common/sounds_common.dart'; 2 | 3 | import 'native_media_format.dart'; 4 | 5 | /// The native Ogg/Opus media format. 6 | class OggOpusMediaFormat extends NativeMediaFormat { 7 | /// ctor 8 | const OggOpusMediaFormat({ 9 | int sampleRate = 16000, 10 | int numChannels = 1, 11 | int bitRate = 16000, 12 | }) : super.detail( 13 | name: 'ogg/opus', 14 | sampleRate: sampleRate, 15 | numChannels: numChannels, 16 | bitRate: bitRate, 17 | ); 18 | 19 | @override 20 | String get extension => 'opus'; 21 | 22 | // MediaRecorder.AudioEncoder.OPUS 23 | @override 24 | int get androidEncoder => 7; 25 | 26 | @override 27 | 28 | /// MediaRecorder.OutputFormat.OGG 29 | int get androidFormat => 11; 30 | 31 | @override 32 | int get iosFormat => 33 | throw MediaFormatException('Ogg/Opus recording is not supported on iOS'); 34 | } 35 | -------------------------------------------------------------------------------- /lib/src/media_format/pcm_media_format.dart: -------------------------------------------------------------------------------- 1 | import '../../sounds.dart'; 2 | import 'native_media_format.dart'; 3 | 4 | /// The native wav media format. 5 | class PCMMediaFormat extends NativeMediaFormat { 6 | /// ctor 7 | const PCMMediaFormat({ 8 | int sampleRate = 16000, 9 | int numChannels = 1, 10 | int bitRate = 16000, 11 | }) : super.detail( 12 | name: 'pcm', 13 | sampleRate: sampleRate, 14 | numChannels: numChannels, 15 | bitRate: bitRate, 16 | ); 17 | @override 18 | String get extension => 'pcm'; 19 | 20 | /// 2 but not supported 21 | @override 22 | int get androidEncoder => 23 | throw MediaFormatException('PCM recording is not supported on Android'); 24 | 25 | @override 26 | int get androidFormat => 27 | throw MediaFormatException('PCM recording is not supported on Android'); 28 | 29 | /// kAudioFormatLinearPCM 30 | @override 31 | int get iosFormat => 1819304813; 32 | } 33 | -------------------------------------------------------------------------------- /android/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /lib/src/media_format/mp3_media_format.dart: -------------------------------------------------------------------------------- 1 | import '../../sounds.dart'; 2 | import 'native_media_format.dart'; 3 | 4 | /// The native mp3 media format. 5 | class MP3MediaFormat extends NativeMediaFormat { 6 | /// ctor 7 | MP3MediaFormat({ 8 | int sampleRate = 16000, 9 | int numChannels = 1, 10 | int bitRate = 16000, 11 | }) : super.detail( 12 | name: 'mp3', 13 | sampleRate: sampleRate, 14 | numChannels: numChannels, 15 | bitRate: bitRate, 16 | ); 17 | @override 18 | String get extension => 'mp3'; 19 | 20 | // mp3 not supported on android. 21 | @override 22 | int get androidEncoder => 23 | throw MediaFormatException('MP3 recording is not supported on android'); 24 | 25 | @override 26 | int get androidFormat => 27 | throw MediaFormatException('MP3 recording is not supported on android'); 28 | 29 | @override 30 | int get iosFormat => 31 | throw MediaFormatException('MP3 recording is not supported on iOS'); 32 | } 33 | -------------------------------------------------------------------------------- /lib/src/media_format/adts_aac_media_format.dart: -------------------------------------------------------------------------------- 1 | import 'native_media_format.dart'; 2 | 3 | /// A native media format 4 | /// MediaFormat: adts/aac 5 | /// Format/Container: ADTS in an MPEG container. 6 | /// 7 | /// Support by both ios and android 8 | class AdtsAacMediaFormat extends NativeMediaFormat { 9 | /// ctor 10 | const AdtsAacMediaFormat({ 11 | int sampleRate = 16000, 12 | int numChannels = 1, 13 | int bitRate = 16000, 14 | }) : super.detail( 15 | name: 'adts/aac', 16 | sampleRate: sampleRate, 17 | numChannels: numChannels, 18 | bitRate: bitRate, 19 | ); 20 | 21 | @override 22 | String get extension => 'aac'; 23 | 24 | // Whilst the actual index is MediaRecorder.AudioEncoder.AAC (3) 25 | @override 26 | int get androidEncoder => 3; 27 | 28 | /// MediaRecorder.OutputFormat.AAC_ADTS 29 | @override 30 | int get androidFormat => 6; 31 | 32 | /// kAudioFormatMPEG4AAC 33 | @override 34 | int get iosFormat => 1633772320; 35 | } 36 | -------------------------------------------------------------------------------- /test/sound_player_plugin_e2e.dart: -------------------------------------------------------------------------------- 1 | import 'dart:async'; 2 | 3 | import 'package:completer_ex/completer_ex.dart'; 4 | import 'package:sounds/sounds.dart'; 5 | import 'package:flutter_test/flutter_test.dart'; 6 | // import 'package:e2e/e2e.dart'; 7 | 8 | void main() { 9 | // E2EWidgetsFlutterBinding.ensureInitialized(); 10 | 11 | testWidgets('Can get battery level', (tester) async { 12 | final player = SoundPlayer.noUI(); 13 | expect(player, equals(isNotNull)); 14 | 15 | var released = false; 16 | final finished = CompleterEx(); 17 | 18 | player.onStopped = ({wasUser = false}) => finished.complete(true); 19 | Future.delayed(const Duration(seconds: 10), () => finished.complete(false)); 20 | 21 | await player.play(Track.fromFile('assets/sample.acc', 22 | mediaFormat: WellKnownMediaFormats.adtsAac)); 23 | 24 | await finished.future.then((release) => released = release); 25 | 26 | await finished.future; 27 | 28 | expect(released, true); 29 | }); 30 | } 31 | -------------------------------------------------------------------------------- /doc/api/downloader.md: -------------------------------------------------------------------------------- 1 | # Downloader 2 | 3 | ## Overview 4 | 5 | The `Downloader` class is used internally and provided to users as a convenient mechanism for pre-caching audio located at a URL. 6 | 7 | The `Downloader` class can actually be used to download any resource. 8 | 9 | The `Downloader` class downloads the URL and saves it into a local file. 10 | 11 | It is your responsibility to delete the local file once you have finished with it. 12 | 13 | ```dart 14 | var saveToFile = TempMediaFile().empty(); 15 | 16 | await Downloader.download('https://some/path/rock.aac', saveToFile); 17 | 18 | var track = Track.fromPath(saveToFile); 19 | ... 20 | FileUtil().delete(saveToFile); 21 | ``` 22 | 23 | You can also obtain download progress information. 24 | 25 | ```dart 26 | var saveToFile = TempMediaFile().empty(); 27 | 28 | await Downloader.download('https://some/path/rock.aac', saveToFile, progress: (disposition) { 29 | print('progress ${disposition.state}, ${disposition.progress}'; 30 | }); 31 | ``` 32 | 33 | -------------------------------------------------------------------------------- /example/lib/demo_util/demo_player_state.dart: -------------------------------------------------------------------------------- 1 | import 'dart:async'; 2 | 3 | /// Used to track the players state. 4 | class PlayerState { 5 | static final PlayerState _self = PlayerState._internal(); 6 | 7 | bool _hushOthers = true; 8 | 9 | /// factory to retrieve a PlayerState 10 | factory PlayerState() { 11 | return _self; 12 | } 13 | 14 | PlayerState._internal(); 15 | 16 | /// returns true if hushOthers (reduce other players volume) 17 | /// is enabled. 18 | bool get hushOthers => _hushOthers; 19 | 20 | /// When we play something during whilst other audio is playing 21 | /// 22 | /// E.g. if Spotify is playing 23 | /// We can: 24 | // Stop Spotify 25 | // Play both our sound and Spotify 26 | // Or lower Spotify Sound during our playback. 27 | /// [setHush] controls option three. 28 | /// When passsing true to [setHush] the other auidio 29 | /// player's (e.g. spotify) sound is lowered. 30 | /// 31 | Future setHush({required bool hushOthers}) async { 32 | _hushOthers = hushOthers; 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /example/android/app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 9 | 15 | 18 | 19 | -------------------------------------------------------------------------------- /android/src/main/res/layout/activity_main.xml: -------------------------------------------------------------------------------- 1 | 2 | 12 | 13 |