Audaspace 1.4.0
A high level audio library.
Loading...
Searching...
No Matches
Public Member Functions | List of all members
Triangle Class Reference

This sound creates a reader that plays a triangle tone. More...

#include <Triangle.h>

Inheritance diagram for Triangle:
Inheritance graph
[legend]

Public Member Functions

 Triangle (float frequency, SampleRate sampleRate=RATE_48000)
 Creates a new triangle sound.
 
float getFrequency () const
 Returns the frequency of the triangle wave.
 
virtual std::shared_ptr< IReadercreateReader ()
 Creates a reader for playback of the sound source.
 
- Public Member Functions inherited from ISound
virtual ~ISound ()
 Destroys the sound.
 
virtual std::shared_ptr< IReadercreateReader ()=0
 Creates a reader for playback of the sound source.
 

Detailed Description

This sound creates a reader that plays a triangle tone.

Constructor & Destructor Documentation

◆ Triangle()

Triangle::Triangle ( float  frequency,
SampleRate  sampleRate = RATE_48000 
)

Creates a new triangle sound.

Parameters
frequencyThe desired frequency.
sampleRateThe target sample rate for playback.

Member Function Documentation

◆ createReader()

virtual std::shared_ptr< IReader > Triangle::createReader ( )
virtual

Creates a reader for playback of the sound source.

Returns
A pointer to an IReader object or nullptr if there has been an error.
Exceptions
ExceptionAn exception may be thrown if there has been a more unexpected error during reader creation.

Implements ISound.


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