Created
January 20, 2012 22:19
-
-
Save alex-laties/1649926 to your computer and use it in GitHub Desktop.
implementation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// SoundAnalyzer.cpp | |
// BadTouchCLI | |
// | |
// Created by Alex Laties on 1/20/12. | |
// Copyright (c) 2012 University of Pennsylvania. All rights reserved. | |
// | |
#include "SoundAnalyzer.h" | |
void SoundAnalyzer::ProcessPacket(<#AudioQueueBufferRef buf#>) { | |
//TODO something | |
} | |
SoundAnalyzer::SoundAnalyzer(){ | |
position = 0; | |
last_peak = 0; | |
num_peaks = 0; | |
max_amplitude = 0.; | |
time_since_last = 0.; | |
clip_length = 0.; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// SoundAnalyzer.h | |
// BadTouchCLI | |
// | |
// Created by Alex Laties on 1/20/12. | |
// Copyright (c) 2012 University of Pennsylvania. All rights reserved. | |
// | |
#ifndef BadTouchCLI_SoundAnalyzer_h | |
#define BadTouchCLI_SoundAnalyzer_h | |
#include <AudioToolbox/AudioToolbox.h> | |
#include <stdio.h> | |
#include <stdlib.h> | |
class SoundAnalyzer { | |
private: | |
int position; | |
int last_peak; | |
int num_peaks; | |
float max_amplitude; | |
float time_since_last; | |
float clip_length; | |
public: | |
void ProcessPacket(AudioQueueBufferRef buf); | |
SoundAnalyzer(); | |
}; | |
#endif |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment