SystemAudioConfig class
Configuration class for system audio capture.
This class allows you to configure audio capture parameters for system audio (audio output from the device), such as sample rate and number of channels.
Example:
// Create with default values
final config = SystemAudioConfig();
// Create with custom values
final customConfig = SystemAudioConfig(
sampleRate: 44100,
channels: 2,
);
// Use with capture
final capture = SystemAudioCapture(config: customConfig);
// Update configuration
final updatedConfig = customConfig.copyWith(
sampleRate: 48000,
);
capture.updateConfig(updatedConfig);
- Inheritance
-
- Object
- AudioCaptureConfig
- SystemAudioConfig
Constructors
- SystemAudioConfig({int sampleRate = 16000, int channels = 1})
- Creates a new SystemAudioConfig instance.
Properties
- channels → int
-
Number of audio channels (default: 1 for mono).
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- sampleRate → int
-
Sample rate in Hz (default: 16000).
final
Methods
-
copyWith(
{int? sampleRate, int? channels}) → SystemAudioConfig - Creates a copy of this configuration with modified values.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toMap(
) → Map< String, dynamic> - Converts this configuration to a map for method channel communication.
-
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited