-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Shaji Khan
committed
Oct 12, 2024
1 parent
18cf731
commit be87bbd
Showing
38 changed files
with
142 additions
and
28 deletions.
There are no files selected for viewing
Binary file not shown.
Binary file not shown.
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
Binary file not shown.
Binary file not shown.
Binary file not shown.
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
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
#include "pa.h" | ||
|
||
int | ||
process (int nframes, void *arg) | ||
{ | ||
AudioDriver * driver = (AudioDriver *) arg ; | ||
float *in, *out; | ||
|
||
driver -> processor -> process (nframes, in, out); | ||
return 0; | ||
} | ||
|
||
bool AudioDriver::activate () { | ||
|
||
/* Connect the ports. You can't do this before the client is | ||
* activated, because we can't make connections to clients | ||
* that aren't running. Note the confusing (but necessary) | ||
* orientation of the driver backend ports: playback ports are | ||
* "input" to the backend, and capture ports are "output" from | ||
* it. | ||
*/ | ||
|
||
return true ; | ||
} | ||
|
||
bool AudioDriver::deactivate () { | ||
|
||
return true ; | ||
|
||
} | ||
|
||
bool AudioDriver::open () { | ||
return activate () ; | ||
} | ||
|
||
void AudioDriver::close () { | ||
|
||
} | ||
|
||
int AudioDriver::get_sample_rate () { | ||
return 48000; | ||
} | ||
|
||
int AudioDriver::get_buffer_size () { | ||
return 192 ; | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
#ifndef PA_H | ||
#define PA_H | ||
|
||
#include <cstdlib> | ||
#include <cstdio> | ||
#include <cstring> | ||
|
||
#include "log.h" | ||
#include "process.h" | ||
|
||
class AudioDriver { | ||
public: | ||
Processor * processor = nullptr; | ||
AudioDriver (Processor * e) { | ||
processor = e ; | ||
} | ||
|
||
bool open (); | ||
void close (); | ||
int get_sample_rate () ; | ||
bool activate () ; | ||
bool deactivate () ; | ||
int get_buffer_size (); | ||
} ; | ||
|
||
#endif |
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
Binary file not shown.
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
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
Binary file not shown.
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
#define VERSION 135 | ||
#define VERSION 136 |
Binary file not shown.