videoLat  2.1
Video conferencing delay measurements
Instance Methods | Protected Attributes | Properties | List of all members
AudioProcess Class Reference

#import <AudioProcess.h>

Inheritance diagram for AudioProcess:
Inheritance graph
Collaboration diagram for AudioProcess:
Collaboration graph

Instance Methods

(AudioProcess *) - clone
(NSArray *) - processOriginal:
(BOOL) - feedData:size:channels:bitsPerChannel:at:duration:
(uint64_t) - lastMatchTimestamp
(void) - _reset
 Internal: reset internal variables to prepare for new match.

Protected Attributes

BOOL wasNoisy
 true if the previous buffer ended noisily
double prevEnergy
 amount of energy in previous buffer
uint64_t matchTimestamp
 timestamp of most recent match


NSArray * originalSignature

Detailed Description

Object that does pattern-matching on audio data to compare it to a known audio sample.

The current implementation is very simple-minded: it looks for a bit of noise in an otherwise quiet sample.

Method Documentation

◆ feedData:size:channels:bitsPerChannel:at:duration:()

- (BOOL) feedData: (void *)  buffer
size: (size_t)  size
channels: (int)  channels
bitsPerChannel: (int)  nBits
at: (uint64_t)  now
duration: (uint64_t)  duration 

Feed audio data into the matcher.

buffermemory buffer containing audio data (16 bit signed linear PCM)
sizesize of buffer, in bytes
channelsnumber of channels (can be 1 or 2)
nowtimestamp corresponding to first sample in buffer
true if a copy of sample fed into processOriginal has been found (either now or earlier). Once this method returns true you can use lastMatchTimestamp to obtain the timestamp of the match.

◆ lastMatchTimestamp()

- (uint64_t) lastMatchTimestamp

Timestamp (in feedData terms) of match that corresponds to the beginning of the sample fed to processOriginal.

◆ processOriginal:()

- (NSArray *) processOriginal: (NSURL *)  fileURL

Primes the audio processor to detect copies of this sample.

fileURLFile containing original audio sample
the signature of the audio file.

The documentation for this class was generated from the following files: