forked from Binozo/FlutterPlaybackCapture
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathplayback_capture_platform_interface.dart
38 lines (29 loc) · 1.38 KB
/
playback_capture_platform_interface.dart
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
import 'package:plugin_platform_interface/plugin_platform_interface.dart';
import 'data/config/audioencoding.dart';
import 'playback_capture_method_channel.dart';
abstract class PlaybackCapturePlatform extends PlatformInterface {
/// Constructs a PlaybackCapturePlatform.
PlaybackCapturePlatform() : super(token: _token);
static final Object _token = Object();
static PlaybackCapturePlatform _instance = MethodChannelPlaybackCapture();
/// The default instance of [PlaybackCapturePlatform] to use.
///
/// Defaults to [MethodChannelPlaybackCapture].
static PlaybackCapturePlatform get instance => _instance;
/// Platform-specific implementations should set this with their own
/// platform-specific class that extends [PlaybackCapturePlatform] when
/// they register themselves.
static set instance(PlaybackCapturePlatform instance) {
PlatformInterface.verifyToken(instance, _token);
_instance = instance;
}
Future<void> listenAudio(AudioEncoding encoding, int sampleRate, int sampleReadSize, int channelCount) {
throw UnimplementedError('listenAudio() has not been implemented.');
}
Future<void> stopAudioListening() {
throw UnimplementedError('stopAudioListening() has not been implemented.');
}
Future<bool> isAudioRecordingPermissionGranted() {
throw UnimplementedError('isAudioRecordingPermissionGranted() has not been implemented.');
}
}