Audio crossfading
First Claim
1. A method comprising:
- decoding a first audio track to generate first data samples;
buffering the decoded first audio track at a first write pointer pointing to a first buffer;
reading the first data samples from a read pointer of the first buffer to generate playback of the first audio track;
decoding a second audio track to generate second data samples;
mixing the first data samples with the second data samples to generate mixed samples of the first audio track and the second audio track; and
inserting a second write pointer following the read pointer in the first buffer, wherein the second write pointer points to a position in the first buffer where the mixed samples are written.
1 Assignment
0 Petitions
Accused Products
Abstract
Techniques are presented for dynamically controlling an audio crossfade from a first audio track to a second audio track. The first audio track may be decoded and buffered to a first buffer. A user may select a second audio track at some point during playback of the first audio track. The second audio track may be decoded, and a processor may access the decoded second audio track and the buffered first audio track and mix the two audio tracks. The mixed audio track may be inserted in the same first buffer near or at the read pointer of the first buffer, such that latency between the user selection and the crossfade into the selected audio track may be minimized. The insertion of the mixed audio track may depend on various factors, including the type of audio file and/or the decoder type used to decode the second audio track.
11 Citations
22 Claims
-
1. A method comprising:
-
decoding a first audio track to generate first data samples; buffering the decoded first audio track at a first write pointer pointing to a first buffer; reading the first data samples from a read pointer of the first buffer to generate playback of the first audio track; decoding a second audio track to generate second data samples; mixing the first data samples with the second data samples to generate mixed samples of the first audio track and the second audio track; and inserting a second write pointer following the read pointer in the first buffer, wherein the second write pointer points to a position in the first buffer where the mixed samples are written. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9, 10, 11)
-
-
12. An electronic device, comprising:
-
one or more decoders configured to decode a first audio track to produce first data samples and to decode a second audio track to produce second data samples; a buffer configured to hold the first data samples, the second data samples, and mixed data samples corresponding to a mixture of the first data samples and the second data samples; and a processor configured to substantially control the writing of the first data samples and the mixed data samples in the buffer, wherein the processor is configured to; position a read pointer to a beginning portion of the buffer; position a first write pointer to an available portion of the buffer; and position a second write pointer following the read pointer and before the first write pointer. - View Dependent Claims (13, 14, 15, 16, 17, 18, 19)
-
-
20. A method of performing a crossfade operation, comprising:
-
reading first data samples corresponding to a first audio track from a buffer; evaluating characteristics of a second audio track, wherein the characteristics relate to how quickly the second audio track is predicted to be decoded into second data samples; writing a mixture of the first data samples and the second data samples to a position in the buffer based on the evaluation of the characteristics of the second audio track; and reading the mixture from the buffer to generate playback of a crossfade from the first audio track to the second audio track. - View Dependent Claims (21, 22)
-
Specification