Skip to content

Bug: RecorderController.onCurrentDuration is twice the real duration #491

Description

@outdoorapps

I created a controller with

  final _controller = RecorderController();
  final _recorderSettings = const RecorderSettings(
    sampleRate: 16000,
    bitRate: 64000,
  );

Then I used a StreamBuilder to show the duration

                StreamBuilder(
                  stream: _controller.onCurrentDuration,
                  builder: (context, snapshot) => Text(
                    _formatDuration(snapshot.data ?? Duration.zero),
                    style: Theme.of(context).textTheme.titleMedium,
                  ),
                ),

The duration is however twice as much as the real duration, i.e. doing at 10 seconds record will show 20 seconds on the counter. I was running this on Android.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions