videoLat 2.0
Video conferencing delay measurements
Public Member Functions | Protected Attributes | Properties
AudioProcess Class Reference

#import <AudioProcess.h>

List of all members.

Public Member Functions

(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.

Member Function Documentation

- (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.
- (uint64_t) lastMatchTimestamp

Timestamp (in feedData terms) of match that corresponds to the beginning of the sample fed to 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:
 All Classes Namespaces Files Functions Variables Properties Defines