Browse Source

Big Debbug

c90Beretta 7 months ago
parent
commit
d5d23405fe
38 changed files with 4239 additions and 18 deletions
  1. 2 0
      android/.zshrc
  2. 12 17
      android/app/build.gradle
  3. 12 0
      android/app/build/generated/source/buildConfig/debug/com/example/sis_flutter/BuildConfig.java
  4. 1 0
      android/app/build/intermediates/flutter/debug/.last_build_id
  5. 1 0
      android/app/build/intermediates/flutter/debug/flutter_assets/AssetManifest.bin
  6. 1 0
      android/app/build/intermediates/flutter/debug/flutter_assets/AssetManifest.json
  7. 1 0
      android/app/build/intermediates/flutter/debug/flutter_assets/FontManifest.json
  8. BIN
      android/app/build/intermediates/flutter/debug/flutter_assets/NOTICES.Z
  9. BIN
      android/app/build/intermediates/flutter/debug/flutter_assets/assets/audio-file.png
  10. BIN
      android/app/build/intermediates/flutter/debug/flutter_assets/assets/csv.png
  11. BIN
      android/app/build/intermediates/flutter/debug/flutter_assets/assets/edesarrollos_icon_logo.png
  12. BIN
      android/app/build/intermediates/flutter/debug/flutter_assets/assets/edesarrollos_icon_logo_BN.png
  13. BIN
      android/app/build/intermediates/flutter/debug/flutter_assets/assets/edesarrollos_logo.png
  14. BIN
      android/app/build/intermediates/flutter/debug/flutter_assets/assets/edesarrollos_logo_BN.png
  15. BIN
      android/app/build/intermediates/flutter/debug/flutter_assets/assets/excel.png
  16. BIN
      android/app/build/intermediates/flutter/debug/flutter_assets/assets/excel_icon.png
  17. BIN
      android/app/build/intermediates/flutter/debug/flutter_assets/assets/location.png
  18. BIN
      android/app/build/intermediates/flutter/debug/flutter_assets/assets/logo.png
  19. BIN
      android/app/build/intermediates/flutter/debug/flutter_assets/assets/pdf-file.png
  20. BIN
      android/app/build/intermediates/flutter/debug/flutter_assets/assets/settings.png
  21. BIN
      android/app/build/intermediates/flutter/debug/flutter_assets/assets/supergascontigo.png
  22. BIN
      android/app/build/intermediates/flutter/debug/flutter_assets/assets/tanque.png
  23. BIN
      android/app/build/intermediates/flutter/debug/flutter_assets/assets/word.png
  24. BIN
      android/app/build/intermediates/flutter/debug/flutter_assets/fonts/MaterialIcons-Regular.otf
  25. BIN
      android/app/build/intermediates/flutter/debug/flutter_assets/isolate_snapshot_data
  26. BIN
      android/app/build/intermediates/flutter/debug/flutter_assets/kernel_blob.bin
  27. 3193 0
      android/app/build/intermediates/flutter/debug/flutter_assets/packages/flutter_sound_web/howler/howler.js
  28. 159 0
      android/app/build/intermediates/flutter/debug/flutter_assets/packages/flutter_sound_web/src/flutter_sound.js
  29. 411 0
      android/app/build/intermediates/flutter/debug/flutter_assets/packages/flutter_sound_web/src/flutter_sound_player.js
  30. 437 0
      android/app/build/intermediates/flutter/debug/flutter_assets/packages/flutter_sound_web/src/flutter_sound_recorder.js
  31. BIN
      android/app/build/intermediates/flutter/debug/flutter_assets/shaders/ink_sparkle.frag
  32. BIN
      android/app/build/intermediates/flutter/debug/flutter_assets/vm_snapshot_data
  33. 1 0
      android/app/build/intermediates/flutter/debug/flutter_build.d
  34. BIN
      android/app/build/intermediates/flutter/debug/libs.jar
  35. 2 0
      android/app/build/intermediates/incremental/mergeDebugShaders/merger.xml
  36. 2 0
      android/app/build/tmp/packJniLibsflutterBuildDebug/MANIFEST.MF
  37. 4 0
      android/app/src/main/AndroidManifest.xml
  38. 0 1
      android/gradle.properties

+ 2 - 0
android/.zshrc

@@ -0,0 +1,2 @@
+export JAVA_HOME=$(/usr/libexec/java_home -v 17)
+export PATH=$JAVA_HOME/bin:$PATH

+ 12 - 17
android/app/build.gradle

@@ -24,8 +24,16 @@ if (flutterVersionName == null) {
 
 android {
     namespace "com.example.sis_flutter"
-    compileSdkVersion flutter.compileSdkVersion
-    ndkVersion flutter.ndkVersion
+    compileSdkVersion 34
+
+    defaultConfig {
+        applicationId "com.example.sis_flutter"
+        minSdkVersion 21 
+        targetSdkVersion 34
+        versionCode flutterVersionCode.toInteger()
+        versionName flutterVersionName
+        ndkVersion flutter.ndkVersion
+    }
 
     compileOptions {
         sourceCompatibility JavaVersion.VERSION_1_8
@@ -40,21 +48,8 @@ android {
         main.java.srcDirs += 'src/main/kotlin'
     }
 
-    defaultConfig {
-        // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
-        applicationId "com.example.sis_flutter"
-        // You can update the following values to match your application needs.
-        // For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-gradle-build-configuration.
-        minSdkVersion 
-        targetSdkVersion flutter.targetSdkVersion
-        versionCode flutterVersionCode.toInteger()
-        versionName flutterVersionName
-    }
-
     buildTypes {
         release {
-            // TODO: Add your own signing config for the release build.
-            // Signing with the debug keys for now, so `flutter run --release` works.
             signingConfig signingConfigs.debug
         }
     }
@@ -65,5 +60,5 @@ flutter {
 }
 
 dependencies {
-       implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
-}
+    implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
+}

+ 12 - 0
android/app/build/generated/source/buildConfig/debug/com/example/sis_flutter/BuildConfig.java

@@ -0,0 +1,12 @@
+/**
+ * Automatically generated file. DO NOT MODIFY
+ */
+package com.example.sis_flutter;
+
+public final class BuildConfig {
+  public static final boolean DEBUG = Boolean.parseBoolean("true");
+  public static final String APPLICATION_ID = "com.example.sis_flutter";
+  public static final String BUILD_TYPE = "debug";
+  public static final int VERSION_CODE = 1;
+  public static final String VERSION_NAME = "0.1.0";
+}

+ 1 - 0
android/app/build/intermediates/flutter/debug/.last_build_id

@@ -0,0 +1 @@
+c254ed1d512fea8f3eee87fe57aa1eb1

File diff suppressed because it is too large
+ 1 - 0
android/app/build/intermediates/flutter/debug/flutter_assets/AssetManifest.bin


File diff suppressed because it is too large
+ 1 - 0
android/app/build/intermediates/flutter/debug/flutter_assets/AssetManifest.json


+ 1 - 0
android/app/build/intermediates/flutter/debug/flutter_assets/FontManifest.json

@@ -0,0 +1 @@
+[{"family":"MaterialIcons","fonts":[{"asset":"fonts/MaterialIcons-Regular.otf"}]}]

BIN
android/app/build/intermediates/flutter/debug/flutter_assets/NOTICES.Z


BIN
android/app/build/intermediates/flutter/debug/flutter_assets/assets/audio-file.png


BIN
android/app/build/intermediates/flutter/debug/flutter_assets/assets/csv.png


BIN
android/app/build/intermediates/flutter/debug/flutter_assets/assets/edesarrollos_icon_logo.png


BIN
android/app/build/intermediates/flutter/debug/flutter_assets/assets/edesarrollos_icon_logo_BN.png


BIN
android/app/build/intermediates/flutter/debug/flutter_assets/assets/edesarrollos_logo.png


BIN
android/app/build/intermediates/flutter/debug/flutter_assets/assets/edesarrollos_logo_BN.png


BIN
android/app/build/intermediates/flutter/debug/flutter_assets/assets/excel.png


BIN
android/app/build/intermediates/flutter/debug/flutter_assets/assets/excel_icon.png


BIN
android/app/build/intermediates/flutter/debug/flutter_assets/assets/location.png


BIN
android/app/build/intermediates/flutter/debug/flutter_assets/assets/logo.png


BIN
android/app/build/intermediates/flutter/debug/flutter_assets/assets/pdf-file.png


BIN
android/app/build/intermediates/flutter/debug/flutter_assets/assets/settings.png


BIN
android/app/build/intermediates/flutter/debug/flutter_assets/assets/supergascontigo.png


BIN
android/app/build/intermediates/flutter/debug/flutter_assets/assets/tanque.png


BIN
android/app/build/intermediates/flutter/debug/flutter_assets/assets/word.png


BIN
android/app/build/intermediates/flutter/debug/flutter_assets/fonts/MaterialIcons-Regular.otf


BIN
android/app/build/intermediates/flutter/debug/flutter_assets/isolate_snapshot_data


BIN
android/app/build/intermediates/flutter/debug/flutter_assets/kernel_blob.bin


File diff suppressed because it is too large
+ 3193 - 0
android/app/build/intermediates/flutter/debug/flutter_assets/packages/flutter_sound_web/howler/howler.js


+ 159 - 0
android/app/build/intermediates/flutter/debug/flutter_assets/packages/flutter_sound_web/src/flutter_sound.js

@@ -0,0 +1,159 @@
+/*
+ * Copyright 2018, 2019, 2020 Dooboolab.
+ *
+ * This file is part of Flutter-Sound.
+ *
+ * Flutter-Sound is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3 (LGPL-V3), as published by
+ * the Free Software Foundation.
+ *
+ * Flutter-Sound is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with Flutter-Sound.  If not, see <https://www.gnu.org/licenses/>.
+ */
+
+const VERSION = '8.2.0'
+
+
+const VERBOSE = 0;
+const DBG = 1;
+const INFO = 2;
+const WARNING = 3;
+const ERROR = 4;
+const WTF = 5;
+const NOTHING = 6;
+
+
+
+
+const codec =
+                {
+                        defaultCodec:   'defaultCodec',
+                        aacADTS:        'aacADTS',
+                        opusOGG:        'opusOGG',
+                        opusCAF:        'opusCAF',
+                        mp3:            'mp3',
+                        vorbisOGG:      'vorbisOGG',
+                        pcm16:          'pcm16',
+                        pcm16WAV:       'pcm16WAV',
+                        pcm16AIFF:      'pcm16AIFF',
+                        pcm16CAF:       'pcm16CAF',
+                        flac:           'flac',
+                        aacMP4:         'aacMP4',
+                        amrNB:          'amrNB',
+                        amrWB:          'amrWB',
+                        pcm8:           'pcm8',
+                        pcmFloat32:     'pcmFloat32',
+                        pcmWebM:        'pcmWebM',
+                        opusWebM:       'opusWebM',
+                        vorbisWebM:     'vorbisWebM',
+                };
+
+
+const tabCodec =
+                [
+                        codec.opusWebM, // codec.defaultCodec,
+                        codec.aacADTS,
+                        codec.opusOGG,
+                        codec.opusCAF,
+                        codec.mp3,
+                        codec.vorbisOGG,
+                        codec.pcm16,
+                        codec.pcm16WAV,
+                        codec.pcm16AIFF,
+                        codec.pcm16CAF,
+                        codec.flac,
+                        codec.aacMP4,
+                        codec.amrNB,
+                        codec.amrWB,
+                        codec.pcm8,
+                        codec.pcmFloat32,
+                        codec.pcmWebM,
+                        codec.opusWebM,
+                        codec.vorbisWebM,
+                ];
+
+const mime_types =
+                [
+                        'audio/webm\;codecs=opus', // defaultCodec,
+                        'audio/aac', // aacADTS,
+                        'audio/opus\;codecs=opus', // opusOGG,
+                        'audio/x-caf', // opusCAF,
+                        'audio/mp3', // mp3,
+                        'audio/ogg\;codecs=vorbis', // vorbisOGG,
+                        'audio/pcm', // pcm16,
+                        'audio/wav\;codecs=1', // pcm16WAV,
+                        'audio/aiff', // pcm16AIFF,
+                        'audio/x-caf', // pcm16CAF,
+                        'audio/x-flac', // flac,
+                        'audio/mp4', // aacMP4,
+                        'audio/AMR', // amrNB,
+                        'audio/AMR-WB', // amrWB,
+                        'audio/pcm', // pcm8,
+                        'audio/pcm', // pcmFloat32,
+                        'audio/webm\;codecs=pcm', // pcmWebM,
+                        'audio/webm\;codecs=opus', // opusWebM,
+                        'audio/webm\;codecs=vorbis', // vorbisWebM
+                ];
+
+const tabFormat =
+                [
+                        'opus', // defaultCodec,
+                        'aac', // aacADTS,
+                        'opus', // opusOGG,
+                        'caf', // opusCAF,
+                        'mp3', // mp3,
+                        'vorbis', // vorbisOGG,
+                        '', // pcm16,
+                        'wav', // pcm16WAV,
+                        'aiff', // pcm16AIFF,
+                        'caf', // pcm16CAF,
+                        'flac', // flac,
+                        'mp4', // aacMP4,
+                        'AMR', // amrNB,
+                        'AMR-WB', // amrWB,
+                        '', // pcm8,
+                        '', // pcmFloat32,
+                        'pcm', // pcmWebM,
+                        'opus', // opusWebM,
+                        'webm', // vorbisWebM
+
+                ];
+
+
+
+var instanceNumber = 0;
+var lastUrl = '';
+
+
+
+function getRecordURL( aPath,)
+{
+        var path ;
+        var myStorage;
+        if ((aPath == null) || (aPath == ''))
+        {
+                path = lastUrl;
+        } else
+        {
+                path =  aPath;
+
+        }
+        if (path.substring(0,1) == '/')
+        {
+                myStorage = window.localStorage;
+        } else
+        {
+                myStorage = window.sessionStorage;
+        }
+
+        var url = myStorage.getItem(path);
+        return url;
+}
+
+
+

+ 411 - 0
android/app/build/intermediates/flutter/debug/flutter_assets/packages/flutter_sound_web/src/flutter_sound_player.js

@@ -0,0 +1,411 @@
+/*
+ * Copyright 2018, 2019, 2020 Dooboolab.
+ *
+ * This file is part of Flutter-Sound.
+ *
+ * Flutter-Sound is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3 (LGPL-V3), as published by
+ * the Free Software Foundation.
+ *
+ * Flutter-Sound is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with Flutter-Sound.  If not, see <https://www.gnu.org/licenses/>.
+ */
+
+
+const PLAYER_VERSION = '8.2.0'
+
+function newPlayerInstance(aCallback, callbackTable) { return new FlutterSoundPlayer(aCallback, callbackTable); }
+
+const IS_PLAYER_STOPPED = 0;
+const IS_PLAYER_PLAYING = 1;
+const IS_PLAYER_PAUSED = 2;
+
+const CB_updateProgress = 0;
+const CB_updatePlaybackState = 1;
+const CB_needSomeFood = 2;
+const CB_audioPlayerFinished = 3;
+const CB_startPlayerCompleted = 4;
+const CB_pausePlayerCompleted = 5;
+const CB_resumePlayerCompleted = 6;
+const CB_stopPlayerCompleted = 7;
+const CB_openPlayerCompleted = 8;
+const CB_closePlayerCompleted = 9;
+const CB_player_log = 10;
+
+var instanceNumber = 1;
+
+class FlutterSoundPlayer {
+
+        static newInstance(aCallback, callbackTable) { return new FlutterSoundPlayer(aCallback, callbackTable); }
+
+        constructor(aCallback, callbackTable) {
+                this.callback = aCallback;
+                this.callbackTable = callbackTable;
+                this.howl = null;
+                this.temporaryBlob = null;
+                this.status = IS_PLAYER_STOPPED;
+                //this.deltaTime = 0;
+                this.subscriptionDuration = 0;
+                this.duration = 0;
+                this.instanceNo = instanceNumber;
+                this.callbackTable[CB_player_log](this.callback, DBG, 'Instance Number : ' + this.instanceNo.toString())
+                ++instanceNumber;
+        }
+
+        initializeMediaPlayer(focus, category, mode, audioFlags, device, withUI) {
+                //this.callback.openAudioSessionCompleted(true);
+                this.status = IS_PLAYER_STOPPED;
+                this.callbackTable[CB_openPlayerCompleted](this.callback, this.getPlayerState(), true);
+                return this.getPlayerState();
+        }
+
+        releaseMediaPlayer() {
+                this.status = IS_PLAYER_STOPPED;
+                this.callbackTable[CB_closePlayerCompleted](this.callback, this.getPlayerState(), true);
+                return this.getPlayerState();
+        }
+
+
+
+        playAudioFromURL(path, codec) {
+
+                this.callbackTable[CB_player_log](this.callback, DBG, 'JS: ---> playAudioFromURL : ' + path);
+                var me = this;
+                var howl = new Howl
+                        ({
+                                src: [path],
+                                format: tabFormat[codec],
+
+                                onload: function () {
+                                        me.callbackTable[CB_player_log](me.callback, DBG, 'onload');
+					me.howl.play();
+                                },
+
+                                onplay: function () {
+                                        me.callbackTable[CB_player_log](me.callback, DBG, 'onplay');
+                                        me.duration = Math.ceil(howl.duration() * 1000);
+                                        me.status = IS_PLAYER_PLAYING;
+                                        if (me.pauseResume != IS_PLAYER_PAUSED) {
+                                                me.callbackTable[CB_startPlayerCompleted](me.callback, me.getPlayerState(), true, me.duration); // Duration is unknown
+
+                                        } else {
+                                                me.callbackTable[CB_resumePlayerCompleted](me.callback, me.getPlayerState(), true);
+
+                                        }
+                                        me.startTimer();
+
+                                },
+
+                                onplayerror: function () {
+                                        me.callbackTable[CB_player_log](me.callback, ERROR, 'onplayerror');
+                                        me.stop();
+                                },
+
+                                onend: function () {
+                                        me.callbackTable[CB_player_log](me.callback, DBG, 'onend');
+                                        me.stop();
+                                        me.status = IS_PLAYER_STOPPED;
+                                        me.callbackTable[CB_audioPlayerFinished](me.callback, me.getPlayerState());
+                                },
+
+                                onloaderror: function () {
+                                        me.callbackTable[CB_player_log](me.callback, ERROR, 'onloaderror');
+                                        me.stop()
+                                },
+
+                                onpause: function () {
+                                        me.callbackTable[CB_player_log](me.callback, DBG, 'onpause');
+                                        me.status = IS_PLAYER_PAUSED;
+                                        me.callbackTable[CB_pausePlayerCompleted](me.callback, me.getPlayerState(), true);
+
+                                },
+
+                                onstop: function () {
+                                        me.callbackTable[CB_player_log](me.callback, DBG, 'onstop');
+                                        me.status = IS_PLAYER_STOPPED;
+                                        me.howl = null;
+                                        me.callbackTable[CB_stopPlayerCompleted](me.callback, me.getPlayerState(), true);
+                                },
+
+                                onseek: function () {
+                                        //me.callbackTable[CB_player_log](me.callback, DBG, 'onseek');
+                                },
+                        });
+
+                this.howl = howl;
+                if (this.latentVolume != null && this.latentVolume >= 0)
+                        this.howl.volume(this.latentVolume);
+                if (this.latentSpeed != null && this.latentSpeed >= 0)
+                        this.howl.rate(this.latentSpeed);
+                if (this.latentSeek != null && this.latentSeek >= 0)
+                        this.seekToPlayer(this.latentSeek);
+                this.pauseResume = IS_PLAYER_PLAYING;
+                // howl.play(); // This now done in 'onload'
+                this.callbackTable[CB_player_log](this.callback, DBG, 'JS: <--- playAudioFromURL');
+                return this.getPlayerState();
+        }
+
+
+        /* ACTUALLY NOT USED
+                playAudioFromBuffer(dataBuffer) // Actually not used
+                {
+        
+                        var audioCtx = new (window.AudioContext || window.webkitAudioContext)();
+                        var source = audioCtx.createBufferSource();
+                        me.callbackTable[CB_player_log](me.callback, DBG, dataBuffer.constructor.name)
+                        audioCtx.decodeAudioData
+                        (
+                                dataBuffer, //dataBuffer.buffer,
+                                function(buffer)
+                                {
+                                        source.buffer = buffer;
+        
+                                        source.connect(audioCtx.destination);
+                                        source.loop = false;
+                                           // start the source playing
+                                        source.start();
+                                },
+                                function(e){ me.callbackTable[CB_player_log](me.callback, DBG, "Error with decoding audio data" + e.err); }
+                        );
+                        this.callback.startPlayerCompleted(777);
+                        return 0; // playAudioFromBuffer() does not support sound Duration
+        }
+        */
+
+
+
+
+        setAudioFocus(focus, category, mode, audioFlags, device,) {
+                return this.getPlayerState();
+        }
+
+
+        isDecoderSupported(codec,) {
+                return true; // TODO
+        }
+
+        setSubscriptionDuration(duration) {
+                this.callbackTable[CB_player_log](this.callback, DBG, 'setSubscriptionDuration');
+                this.subscriptionDuration = duration;
+                if (duration > 0 && this.howl != null)
+                        this.startTimer();
+                return this.getPlayerState();
+        }
+
+
+        getRecordURL(path,) {
+                var myStorage;
+                if ((path == null) || (path == '')) {
+                        return null;
+                }
+                if (path.includes("/"))
+                        return path;
+                if (path.substring(0, 1) == '/') {
+                        myStorage = window.localStorage;
+                        this.callbackTable[CB_player_log](this.callback, DBG, 'localStorage');
+                } else {
+                        myStorage = window.sessionStorage;
+                        this.callbackTable[CB_player_log](this.callback, DBG, 'sessionStorage');
+                }
+
+                var url = myStorage.getItem(path);
+                return url
+
+        }
+
+        startPlayer(codec, fromDataBuffer, fromURI, numChannels, sampleRate) {
+                this.callbackTable[CB_player_log](this.callback, DBG, 'JS: ---> startPlayer');
+                this.stop();
+                if (this.temporaryBlob != null) {
+                        URL.revokeObjectURL(this.temporaryBlob);
+                        this.temporaryBlob = null;
+                }
+                if (fromDataBuffer != null) {
+                        this.callbackTable[CB_player_log](this.callback, DBG, 'startPlayer : ' + fromDataBuffer.constructor.name);
+                        var anArray = [fromDataBuffer]; // new Array(fromDataBuffer);
+                        // return this.playAudioFromBuffer(fromDataBuffer.buffer); // playAudioFromBuffer() is ctually not used
+                        var blob = new Blob(anArray, { 'type': mime_types[codec] });
+                        fromURI = URL.createObjectURL(blob);
+                        this.temporaryBlob = fromURI;
+
+                }
+                if (fromURI == null || fromURI == '') {
+                        fromURI = lastUrl;
+                        this.callbackTable[CB_player_log](this.callback, DBG, 'Playing lastUrl : ' + lastUrl);
+                }
+
+                this.callbackTable[CB_player_log](this.callback, DBG, 'startPlayer : ' + fromURI);
+                var url = this.getRecordURL(fromURI);
+
+                if (url != null) {
+                        this.callbackTable[CB_player_log](this.callback, DBG, 'startPlayer : ' + url.constructor.name);
+                        fromURI = url;
+                }
+                //this.deltaTime = 0;
+                this.pauseResume = IS_PLAYER_PLAYING; // Maybe too early
+                this.playAudioFromURL(url, codec);
+                this.callbackTable[CB_player_log](this.callback, DBG, 'JS: <--- startPlayer');
+                return this.getPlayerState();
+        }
+
+        feed(data,) {
+                return this.getPlayerState();
+        }
+
+        startPlayerFromTrack(progress, duration, track, canPause, canSkipForward, canSkipBackward, defaultPauseResume, removeUIWhenStopped,) {
+                return 0; // TODO
+        }
+
+        nowPlaying(progress, duration, track, canPause, canSkipForward, canSkipBackward, defaultPauseResume,) {
+                return this.getPlayerState();
+        }
+
+        stop() {
+                this.callbackTable[CB_player_log](this.callback, DBG, 'JS: ---> stop');
+                this.stopTimer();
+
+
+                if (this.temporaryBlob != null)
+                        URL.revokeObjectURL(this.temporaryBlob);
+                this.temporaryBlob = null;
+
+                if (this.howl != null) {
+                        this.howl.stop();
+                        this.callbackTable[CB_player_log](this.callback, DBG, 'JS: <--- stop');
+                        return true;
+                }
+                else {
+                        this.status = IS_PLAYER_STOPPED; // Maybe too early ?
+                        //this.callbackTable[CB_stopPlayerCompleted](this.callback,  IS_PLAYER_STOPPED, true);
+                        this.callbackTable[CB_player_log](this.callback, DBG, 'JS: <--- stop');
+                        return false;
+                }
+
+        }
+
+        stopPlayer() {
+                this.callbackTable[CB_player_log](this.callback, DBG, 'JS: ---> stopPlayer');
+                //if (this.howl == null)
+                //this.callbackTable[CB_stopPlayerCompleted](this.callback,  IS_PLAYER_STOPPED, true);
+                if (!this.stop())
+                        this.callbackTable[CB_stopPlayerCompleted](this.callback, this.getPlayerState(), true);
+                this.callbackTable[CB_player_log](this.callback, DBG, 'JS: <--- stopPlayer');
+                return this.getPlayerState();
+        }
+
+        getPlayerState() {
+                if (this.howl == null) {
+                        this.status = IS_PLAYER_STOPPED;
+                }
+                return this.status;
+        }
+
+        pausePlayer() {
+                this.callbackTable[CB_player_log](this.callback, DBG, 'JS: ---> pausePlayer');
+                this.stopTimer();
+
+                if (this.getPlayerState() == IS_PLAYER_PLAYING) {
+                        //this.status = IS_PLAYER_PAUSED; // Maybe too early
+                        this.howl.pause();
+                } else {
+                        this.callbackTable[CB_pausePlayerCompleted](this.callback, this.getPlayerState(), false);
+                }
+
+                this.callbackTable[CB_player_log](this.callback, DBG, 'JS: <--- pausePlayer');
+                return this.getPlayerState();
+        }
+
+        resumePlayer() {
+                this.callbackTable[CB_player_log](this.callback, DBG, 'JS: ---> resumePlayer');
+                if (this.getPlayerState() == IS_PLAYER_PAUSED) {
+                        //this.status = IS_PLAYER_PLAYING; // Maybe too early
+                        this.pauseResume = IS_PLAYER_PAUSED;
+                        this.howl.play();
+                } else {
+                        this.callbackTable[CB_resumePlayerCompleted](this.callback, this.getPlayerState(), false);
+                }
+                this.startTimer();
+
+                this.callbackTable[CB_player_log](this.callback, DBG, 'JS: <--- resumePlayer');
+                return this.getPlayerState();
+        }
+
+        seekToPlayer(duration) {
+                this.callbackTable[CB_player_log](this.callback, DBG, '---> seekToPlayer()');
+                if (this.howl != null) {
+                        this.latentSeek = 0;
+                        this.countDownDate = new Date().getTime() - duration;
+                        //this.deltaTime = 0;
+                        this.howl.seek(duration / 1000);
+                } else
+                        this.latentSeek = duration;
+                this.callbackTable[CB_player_log](this.callback, DBG, '<--- seekToPlayer()');
+                return this.getPlayerState();
+        }
+
+        setVolume(volume) {
+                this.callbackTable[CB_player_log](this.callback, DBG, '---> setVolume()');
+                this.latentVolume = volume;
+                if (this.howl != null)
+                        this.howl.volume(volume);
+                this.callbackTable[CB_player_log](this.callback, DBG, '<--- setVolume()');
+                return this.getPlayerState();
+        }
+
+
+        setSpeed(speed) {
+                this.callbackTable[CB_player_log](this.callback, DBG, '---> setSpeed()');
+                this.latentSpeed = speed;
+                if (this.howl != null)
+                        this.howl.rate(speed);
+                this.callbackTable[CB_player_log](this.callback, DBG, '<--- setSpeed()');
+                return this.getPlayerState();
+        }
+
+        setUIProgressBar(duration, progress) {
+                return this.getPlayerState();
+        }
+
+
+        startTimer() {
+                this.callbackTable[CB_player_log](this.callback, DBG, '---> startTimer()');
+                this.stopTimer();
+                var me = this;
+
+                if (this.subscriptionDuration > 0) {
+                        this.countDownDate = new Date().getTime();
+                        this.timerId = setInterval
+                                (
+                                        function () {
+                                                //var now = new Date().getTime();
+                                                //var distance = now - me.countDownDate;
+                                                //distance += me.deltaTime;
+                                                var pos = Math.floor(me.howl.seek() * 1000);
+                                                if (pos > me.duration)
+                                                        pos = me.duration;
+                                                me.callbackTable[CB_updateProgress](me.callback, pos/*me.deltaTime + distance*/, me.duration);
+
+                                        },
+                                        this.subscriptionDuration
+                                );
+                }
+                this.callbackTable[CB_player_log](this.callback, DBG, '<--- startTimer()');
+        }
+
+        stopTimer() {
+                this.callbackTable[CB_player_log](this.callback, DBG, 'stopTimer()');
+                if (this.timerId != null) {
+                        clearInterval(this.timerId);
+                        //var now = new Date().getTime();
+                        //var distance = now - this.countDownDate;
+                        //this.deltaTime += distance;
+                        this.timerId = null;
+                }
+        }
+
+}

+ 437 - 0
android/app/build/intermediates/flutter/debug/flutter_assets/packages/flutter_sound_web/src/flutter_sound_recorder.js

@@ -0,0 +1,437 @@
+/*
+ * Copyright 2018, 2019, 2020 Dooboolab.
+ *
+ * This file is part of Flutter-Sound.
+ *
+ * Flutter-Sound is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3 (LGPL-V3), as published by
+ * the Free Software Foundation.
+ *
+ * Flutter-Sound is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with Flutter-Sound.  If not, see <https://www.gnu.org/licenses/>.
+ */
+
+const RECORDER_VERSION = '8.2.0'
+
+const IS_RECORDER_PAUSED = 1;
+const IS_RECORDER_RECORDING = 2;
+const IS_RECORDER_STOPPED = 0;
+
+function newRecorderInstance(aCallback, callbackTable) { return new FlutterSoundRecorder(aCallback, callbackTable); }
+
+
+const CB_updateRecorderProgress = 0;
+const CB_recordingData = 1;
+const CB_startRecorderCompleted = 2;
+const CB_pauseRecorderCompleted = 3;
+const CB_resumeRecorderCompleted = 4;
+const CB_stopRecorderCompleted = 5;
+const CB_openRecorderCompleted = 6;
+const CB_closeRecorderCompleted = 7;
+const CB_recorder_log = 8;
+
+class FlutterSoundRecorder {
+        static newInstance(aCallback, callbackTable) { return new FlutterSoundRecorder(aCallback, callbackTable); }
+
+        constructor(aCallback, callbackTable) {
+                this.callback = aCallback;
+                this.callbackTable = callbackTable;
+                this.subscriptionDuration = 0;
+                this.timerId = null;
+                this.deltaTime = 0;
+                this.currentRecordPath = '';
+                this.localObjects = [];
+                this.instanceNo = instanceNumber;
+                this.callbackTable[CB_recorder_log](this.callback, DBG, 'Instance Number : ' + this.instanceNo.toString())
+                ++instanceNumber;
+        }
+
+
+
+        initializeFlautoRecorder(focus, category, mode, audioFlags, device) {
+                this.callbackTable[CB_recorder_log](this.callback, DBG, 'initializeFlautoRecorder');
+                this.callbackTable[CB_openRecorderCompleted](this.callback, IS_RECORDER_STOPPED, true);
+
+        }
+
+
+        deleteObjects() {
+                this.callbackTable[CB_recorder_log](this.callback, DBG, 'JS:---> deleteObjects ');
+                for (var url in this.localObjects) {
+                        this.callbackTable[CB_recorder_log](this.callback, DBG, 'deleteRecord : ' + url);
+                        this.deleteRecord(url);
+                }
+                this.callbackTable[CB_recorder_log](this.callback, DBG, 'JS:<--- deleteObjects ');
+        }
+
+
+        releaseFlautoRecorder() {
+                this.callbackTable[CB_recorder_log](this.callback, DBG, 'JS:---> releaseFlautoRecorder');
+                this.stop();
+                this.deleteObjects();
+                this.localObjects = [];
+
+                this.callbackTable[CB_closeRecorderCompleted](this.callback, IS_RECORDER_STOPPED, true);
+                this.callbackTable[CB_recorder_log](this.callback, DBG, 'JS:<--- releaseFlautoRecorder');
+        }
+
+
+        setAudioFocus(focus, category, mode, audioFlags, device) {
+                this.callbackTable[CB_recorder_log](this.callback, DBG, 'setAudioFocus');
+        }
+
+
+        isEncoderSupported(codec) {
+                /*
+                                for (var i in mime_types)
+                                {
+                                }
+                */
+                var r = MediaRecorder.isTypeSupported(mime_types[codec]);
+                if (r)
+                        this.callbackTable[CB_recorder_log](this.callback, DBG, 'mime_types[codec] encoder is supported');
+                else
+                        this.callbackTable[CB_recorder_log](this.callback, DBG, 'mime_types[codec] encoder is NOT supported');
+                return r;
+        }
+
+
+        setSubscriptionDuration(duration) {
+                this.callbackTable[CB_recorder_log](this.callback, DBG, 'setSubscriptionDuration');
+                this.subscriptionDuration = duration;
+                if (this.mediaRecorder != null)
+                        this.startTimer();
+        }
+
+
+        _deleteRecord(aPath,) {
+                this.callbackTable[CB_recorder_log](this.callback, DBG, 'deleteRecord: ' + aPath);
+                if ((aPath == null) || (aPath == '')) {
+                        path = lasturl;
+                } else {
+                        var path = aPath;
+                }
+                var myStorage;
+                if (path.substring(0, 1) == '/') {
+                        myStorage = window.localStorage;
+                        this.callbackTable[CB_recorder_log](this.callback, DBG, 'localStorage');
+                } else {
+                        myStorage = window.sessionStorage;
+                        this.callbackTable[CB_recorder_log](this.callback, DBG, 'sessionStorage');
+                }
+                var oldUrl = myStorage.getItem(path);
+                if (oldUrl != null && oldUrl != '') {
+                        this.callbackTable[CB_recorder_log](this.callback, DBG, 'Deleting object  : ' + oldUrl.toString());
+                        URL.revokeObjectURL(oldUrl);
+                        return true;
+                }
+
+                return false;
+        }
+
+
+
+        deleteRecord(path) {
+                this._deleteRecord(path);
+
+                var found = this.localObjects.findIndex(element => element == path);
+                if (found != null && found >= 0) {
+                        this.callbackTable[CB_recorder_log](this.callback, DBG, "Found : " + found);
+                        this.localObjects[found] = null;
+                }
+
+        }
+
+        setRecordURL(aPath, newUrl) {
+                this.callbackTable[CB_recorder_log](this.callback, DBG, 'setRecordUrl: ' + aPath + ' <- ' + newUrl);
+                var path = aPath;
+                var myStorage;
+                if ((path == null) || (path == '')) {
+                        return null;
+                }
+                if (path.substring(0, 1) == '/') {
+                        myStorage = window.localStorage;
+                        this.callbackTable[CB_recorder_log](this.callback, DBG, 'localStorage');
+                } else {
+                        myStorage = window.sessionStorage;
+                        this.callbackTable[CB_recorder_log](this.callback, DBG, 'sessionStorage');
+                }
+                var oldUrl = myStorage.getItem(path);
+                if (oldUrl != null && oldUrl != '') {
+                        this.callbackTable[CB_recorder_log](this.callback, DBG, 'Deleting object ' + ' : ' + oldUrl.toString());
+                        URL.revokeObjectURL(oldUrl);
+                } else {
+
+                }
+
+                lastUrl = aPath;
+
+                myStorage.setItem(path, newUrl);
+                this.callbackTable[CB_recorder_log](this.callback, DBG, '<--- setRecordURL ( ' + path + ' ) : ' + newUrl);
+
+        }
+
+        getRecordURL(aPath,) {
+                this.callbackTable[CB_recorder_log](this.callback, DBG, '---> getRecordURL : ' + aPath);
+                var r = getRecordURL(aPath);
+                if (r == null)
+                        r = ''; // stopRecorder does not like a null
+                this.callbackTable[CB_recorder_log](this.callback, DBG, '<--- getRecordURL :' + r);
+                return r;
+        }
+
+
+        async startRecorder(path, sampleRate, numChannels, bitRate, codec, toStream, audioSource) {
+                this.callbackTable[CB_recorder_log](this.callback, DBG, 'startRecorder');
+                //var constraints = { audio: true};
+                //var chunks ;//= [];
+                var me = this;
+                this.currentRecordPath = path;
+                var chunks = [];
+                var mediaStream;
+                mediaStream = await navigator.mediaDevices.getUserMedia({ audio: true, video: false });
+                me.mediaStream = mediaStream;
+
+
+                //navigator.mediaDevices.getUserMedia(constraints).then
+                //(function(mediaStream)
+                //{
+                /*
+                        var audioCtx = new AudioContext();
+
+
+                        var source = audioCtx.createMediaStreamSource(mediaStream);
+                        //var dest = new audioCtx.createMediaStreamDestination();
+                        var offlineCtx = new OfflineAudioContext(2,44100*40,44100);
+                        var sourceOfflineCtx = offlineCtx.createBufferSource();
+                        //source.connect(sourceOfflineCtx);
+                        //source.connect(offlineCtx.source);
+                        //source.start();
+                        offlineCtx.startRendering().then(function(renderedBuffer)
+                        {
+                                //this.caller.toto(chunks);
+                                onStop(renderedBuffer);
+                        }
+                        ).catch(function(err)
+                        {
+                                // Note: The promise should reject when startRendering is called a second time on an OfflineAudioContext
+                        }
+                        );
+*/
+
+                //       var buffer = audioCtx.createBuffer(numChannels, tenMinutes, sampleRate); // Play back ???
+                //      source.connect(audioCtx.destination); // This ouput to speaker // TODO : not yet supported
+
+
+                // ===========================================================================
+
+                var options =
+                {
+                        audioBitsPerSecond: bitRate,
+                        mimeType: mime_types[codec]
+                }
+
+                var mediaRecorder = new MediaRecorder(mediaStream, options);
+                me.mediaRecorder = mediaRecorder;
+                if (toStream) // not yet implemented !
+                        mediaRecorder.start(30); // 30 milliseconds for a chunk
+                else
+                        mediaRecorder.start();
+                me.callbackTable[CB_recorder_log](me.callback, DBG, "recorder started : " + mediaRecorder.state);
+
+
+                mediaRecorder.ondataavailable = function (e) {
+                        if (e.data) {
+                                if (toStream) // not yet implemented !
+                                {
+                                        me.callbackTable[CB_recordingData](me.callback, e.data);
+
+                                }
+                                if (path != null && path != '') {
+                                        me.callbackTable[CB_recorder_log](me.callback, DBG, 'On data available : ' + e.data.constructor.name);
+                                        chunks.push(e.data);
+                                }
+                        }
+                }
+
+                mediaRecorder.onstart = function (e) {
+                        me.callbackTable[CB_recorder_log](me.callback, DBG, '---> mediaRecorder OnStart');
+                        me.deltaTime = 0;
+                        me.startTimer();
+                        me.callbackTable[CB_recorder_log](me.callback, DBG, '<---mediaRecorder OnStart : ' + me.mediaRecorder.state);
+                        me.callbackTable[CB_startRecorderCompleted](me.callback, IS_RECORDER_RECORDING, true);
+
+                }
+
+                mediaRecorder.onerror = function (e) {
+                        me.callbackTable[CB_recorder_log](me.callback, DBG, "mediaRecorder OnError : " + e.error);
+                        me.stopRecorder()
+                }
+
+                mediaRecorder.onpause = function (e) {
+                        me.callbackTable[CB_recorder_log](me.callback, DBG, '---> mediaRecorder onpause');
+                        me.callbackTable[CB_pauseRecorderCompleted](me.callback, IS_RECORDER_PAUSED, true);
+                        me.callbackTable[CB_recorder_log](me.callback, DBG, '<--- mediaRecorder onpause');
+                }
+
+                mediaRecorder.onresume = function (e) {
+                        me.callbackTable[CB_recorder_log](me.callback, DBG, '---> mediaRecorder onresume');
+                        me.callbackTable[CB_resumeRecorderCompleted](me.callback, IS_RECORDER_RECORDING, true);
+                        me.callbackTable[CB_recorder_log](me.callback, DBG, '<--- mediaRecorder onresume');
+                }
+
+                mediaRecorder.onstop = function (e) {
+
+                        me.callbackTable[CB_recorder_log](me.callback, DBG, '---> mediaRecorder onstop');
+                        var blob = new Blob(chunks, { 'type': mime_types[codec] });
+                        var url = URL.createObjectURL(blob);
+                        me.callbackTable[CB_recorder_log](me.callback, DBG, 'Instance Number : ' + me.instanceNo.toString())
+
+                        me.setRecordURL(path, url);
+
+                        var found = me.localObjects.findIndex(element => element == path);
+                        if (found != null && found >= 0) {
+                                me.callbackTable[CB_recorder_log](me.callback, DBG, "Found : " + found);
+                                me.localObjects[found] = path;
+                        } else {
+                                me.callbackTable[CB_recorder_log](me.callback, DBG, "NOT FOUND! : " + path);
+                                me.localObjects.push(path);
+                        }
+
+
+                        /*
+                                                                var xhr = new XMLHttpRequest();
+                                                                var blob;
+                                                                var fileReader = new FileReader();
+                                                                xhr.open("GET", url, true);
+                                                                xhr.responseType = "arraybuffer";
+                        
+                        
+                                                                xhr.addEventListener("load", function ()
+                                                                {
+                                                                        if (xhr.status === 200)
+                                                                        {
+                                                                                // Create a blob from the response
+                                                                                blob = new Blob([xhr.response], {type: "audio/webm\;codecs=opus"});
+                        
+                                                                                // onload needed since Google Chrome doesn't support addEventListener for FileReader
+                                                                                fileReader.onload = function (evt)
+                                                                                {
+                                                                                        // Read out file contents as a Data URL
+                                                                                        var result = evt.target.result;
+                                                                                        // Set image src to Data URL
+                                                                                        //rhino.setAttribute("src", result);
+                                                                                        // Store Data URL in localStorage
+                                                                                        try
+                                                                                        {
+                                                                                                //localStorage.setItem("rhino", result);
+                                                                                                onStop(result);
+                                                                                                myStorage.setItem(path, JSON.stringify(result));
+                                                                                        } catch (e)
+                                                                                        {
+                                                                                        }
+                                                                                };
+                                                                                // Load blob as Data URL
+                                                                                fileReader.readAsDataURL(blob);
+                                                                        }
+                                                                }, false);
+                                                                // Send XHR
+                                                                xhr.send();
+                                */
+                        chunks = null;///[];
+                        me.callbackTable[CB_recorder_log](me.callback, DBG, 'recorder stopped');
+                        me.mediaRecorder = null;
+                        me.callbackTable[CB_stopRecorderCompleted](me.callback, IS_RECORDER_STOPPED, true, me.getRecordURL(path));
+
+                        me.callbackTable[CB_recorder_log](me.callback, DBG, '<--- mediaRecorder onstop');
+                }
+                //});
+        }
+
+        stop() {
+                this.callbackTable[CB_recorder_log](this.callback, DBG, 'JS:---> stop()');
+                this.stopTimer();
+                if (this.mediaRecorder != null) {
+                        this.mediaRecorder.stop();
+                        this.mediaRecorder = null;
+                }
+                if (this.mediaStream != null) {
+                        this.mediaStream.getTracks().forEach(track => track.stop());
+                        this.mediaStream = null;
+                }
+                this.callbackTable[CB_recorder_log](this.callback, DBG, 'JS:<--- stop()');
+        }
+
+        stopRecorder() {
+                this.callbackTable[CB_recorder_log](this.callback, DBG, 'JS:---> stopRecorder');
+                this.stopTimer();
+                if (this.mediaRecorder != null) {
+                        this.mediaRecorder.stop();
+                } else {
+                        this.callbackTable[CB_stopRecorderCompleted](this.callback, IS_RECORDER_STOPPED, /*false*/true, this.getRecordURL(this.currentRecordPath));
+                }
+                this.mediaRecorder = null;
+
+                if (this.mediaStream != null) {
+                        this.mediaStream.getTracks().forEach(track => track.stop());
+                        this.mediaStream = null;
+                }
+                this.callbackTable[CB_recorder_log](this.callback, DBG, "JS:<--- stopRecorder");
+        }
+
+
+        pauseRecorder() {
+                this.callbackTable[CB_recorder_log](this.callback, DBG, 'pauseRecorder');
+                this.mediaRecorder.pause();
+                this.stopTimer();
+                this.callbackTable[CB_recorder_log](this.callback, DBG, "recorder paused : " + this.mediaRecorder.state);
+
+        }
+
+
+        resumeRecorder() {
+                this.callbackTable[CB_recorder_log](this.callback, DBG, 'resumeRecorder');
+                this.mediaRecorder.resume();
+                this.startTimer();
+                this.callbackTable[CB_recorder_log](this.callback, DBG, "recorder resumed : " + this.mediaRecorder.state);
+        }
+
+        startTimer() {
+                this.callbackTable[CB_recorder_log](this.callback, DBG, 'startTimer()');
+                this.stopTimer();
+                var me = this;
+
+                if (this.subscriptionDuration > 0) {
+                        this.countDownDate = new Date().getTime();
+                        this.timerId = setInterval
+                                (
+                                        function () {
+                                                var now = new Date().getTime();
+                                                var distance = now - me.countDownDate;
+                                                me.callbackTable[CB_updateRecorderProgress](me.callback, me.deltaTime + distance, 0);
+
+                                        },
+                                        this.subscriptionDuration
+                                );
+                }
+        }
+
+        stopTimer() {
+                this.callbackTable[CB_recorder_log](this.callback, DBG, 'JS:---> stopTimer()');
+                if (this.timerId != null) {
+                        clearInterval(this.timerId);
+                        var now = new Date().getTime();
+                        var distance = now - this.countDownDate;
+                        this.deltaTime += distance;
+                        this.timerId = null;
+                }
+                this.callbackTable[CB_recorder_log](this.callback, DBG, 'JS:<--- stopTimer()');
+        }
+
+}
+

BIN
android/app/build/intermediates/flutter/debug/flutter_assets/shaders/ink_sparkle.frag


BIN
android/app/build/intermediates/flutter/debug/flutter_assets/vm_snapshot_data


File diff suppressed because it is too large
+ 1 - 0
android/app/build/intermediates/flutter/debug/flutter_build.d


BIN
android/app/build/intermediates/flutter/debug/libs.jar


File diff suppressed because it is too large
+ 2 - 0
android/app/build/intermediates/incremental/mergeDebugShaders/merger.xml


+ 2 - 0
android/app/build/tmp/packJniLibsflutterBuildDebug/MANIFEST.MF

@@ -0,0 +1,2 @@
+Manifest-Version: 1.0
+

+ 4 - 0
android/app/src/main/AndroidManifest.xml

@@ -1,4 +1,8 @@
 <manifest xmlns:android="http://schemas.android.com/apk/res/android">
+<uses-sdk
+    android:minSdkVersion="21"
+    android:targetSdkVersion="34"
+/>
     <application
         android:label="sis_flutter"
         android:name="${applicationName}"

+ 0 - 1
android/gradle.properties

@@ -1,4 +1,3 @@
 org.gradle.jvmargs=-Xmx4G
 android.useAndroidX=true
 android.enableJetifier=true
-org.gradle.java.home=/path/to/your/java11