File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed
Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -28,7 +28,7 @@ apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
2828android {
2929 compileSdkVersion flutter. compileSdkVersion
3030 ndkVersion flutter. ndkVersion
31- namespace ' is.mideind.embla_core_example '
31+ namespace ' com.example.example '
3232
3333 compileOptions {
3434 sourceCompatibility JavaVersion . VERSION_1_8
Original file line number Diff line number Diff line change @@ -87,16 +87,16 @@ class AudioRecorder {
8787 _isRecording = true ;
8888
8989 // Create recording stream
90- _recordingDataController = StreamController <Food >();
90+ _recordingDataController = StreamController <Uint8List >();
9191 _recordingDataSubscription = _recordingDataController? .stream.listen ((buffer) {
92- if (buffer is FoodData && buffer.data != null ) {
93- final data = buffer.data as Uint8List ;
92+ if (buffer is Uint8List && buffer != null ) {
93+ final data = buffer;
9494 _totalAudioDataSize += data.lengthInBytes;
9595 _totalAudioDuration = _totalAudioDataSize / (kAudioSampleRate * 2 );
9696 dataHandler (data); // Invoke callback
9797 dlog (_totalAudioDuration);
9898 } else {
99- final errMsg = 'Got null data in recording stream: $ buffer ' ;
99+ const errMsg = 'Bad data in recording stream' ;
100100 dlog (errMsg);
101101 errHandler (errMsg);
102102 }
You can’t perform that action at this time.
0 commit comments