Skip to content

Change CurrentTime in AudioFileReader will cause waveOutEvent out of sync except wav file #1227

@Johnwikix

Description

@Johnwikix
public void ChangeCurrentTime(TimeSpan timeSpan) {
    lock (_audioFileReaderLock) {
        audioFileReader.CurrentTime = timeSpan;
    }            
}

Changing the CurrentTime of audioFileReader using the above code will cause the CurrentTime returned by audioFileReader to lose synchronization with the audio actually played by waveOutEvent (the returned CurrentTime is usually a few seconds ahead of the audio). This issue occurs with all the formats I tested (mp3, flac, aiff) except for wav.

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