QDriverStation
The free, cross-platform FRC Driver Station
Public Slots | Public Member Functions | Private Attributes | List of all members
Beeper Class Reference

Uses SDL to generate telephone-like sound tones on the fly. More...

#include <beeper.h>

Inheritance diagram for Beeper:

Public Slots

void setEnabled (bool enabled)
 
void beep (qreal frequency, int duration)
 

Public Member Functions

 Beeper ()
 
 ~Beeper ()
 
void generateSamples (qint16 *stream, int length)
 

Private Attributes

bool m_enabled
 
double m_angle
 

Detailed Description

Uses SDL to generate telephone-like sound tones on the fly.

Constructor & Destructor Documentation

Beeper::Beeper ( )
explicit

Configures the audio spec

Beeper::~Beeper ( )

Stop using the SDL audio when destroying this class

Member Function Documentation

void Beeper::beep ( qreal  frequency,
int  duration 
)
slot

Generates a beep of the given frequency & duration (in milliseconds).

Note
The request will be ignored if the beeper is disabled
void Beeper::setEnabled ( bool  enabled)
slot

Enables or disables the sound output


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