Skip to content

Commit 3e5f20e

Browse files
Merge pull request #3 from h4yn0nnym0u5e/dev/h4y/fixes/test-01
Dev/h4y/fixes/test 01
2 parents f7afb85 + d611a54 commit 3e5f20e

37 files changed

+391
-193
lines changed

.github/workflows/ubuntu_x64_cmake.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,8 @@ jobs:
2626

2727
- uses: actions/checkout@v2
2828
with:
29-
repository: newdigate/teensy-x86-stubs
29+
repository: h4yn0nnym0u5e/teensy-x86-stubs
30+
ref: feature/EventResponder
3031
path: teensy-x86-stubs
3132

3233
- uses: actions/checkout@v2
@@ -87,13 +88,13 @@ jobs:
8788
8889
- name: upload artifacts
8990
if: always()
90-
uses: actions/upload-artifact@v1
91+
uses: actions/upload-artifact@v4
9192
with:
9293
name: test-audio-output
9394
path: output
9495

9596
- name: Publish Unit Test Results
96-
uses: EnricoMi/publish-unit-test-result-action@v1
97+
uses: EnricoMi/publish-unit-test-result-action@v2
9798
if: always()
9899
with:
99100
files: output/junit-test-results.xml

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,4 +31,5 @@
3131
*.out
3232
*.app
3333

34-
cmake-build-debug
34+
cmake-build-debug
35+
output

extras/linux/array/array.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ int main() {
4040
setup();
4141
while(true){
4242
loop();
43+
yield();
4344
}
4445
}
4546
#endif

extras/linux/sd_raw/sd_raw.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ AudioConnection patchCord2(playSdRaw1, 0, i2s2, 1);
1515
// GUItool: end automatically generated code
1616

1717
#define A14 10
18-
#define BUILTIN_SDCARD 10
18+
// #define BUILTIN_SDCARD 10
1919

2020
const char* _filename = "DEMO.RAW";
2121
const int analogInPin = A14;
@@ -65,10 +65,11 @@ void loop() {
6565
#ifdef BUILD_FOR_LINUX
6666
int main() {
6767
initialize_mock_arduino();
68-
SD.setSDCardFileData("234234234", 5);
68+
SD.setSDCardFileData((char*) "234234234", 5);
6969
setup();
7070
while(true){
7171
loop();
72+
yield();
7273
}
7374
}
7475
#endif

extras/soundio/save_raw/save_raw.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,7 @@ int main() {
113113
setup();
114114
while(!arduino_should_exit){
115115
loop();
116+
yield();
116117
}
117118
delay(1000);
118119
frec.close();

extras/soundio/save_raw_sd/save_raw_sd.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,7 @@ int main(int numArgs, char **args) {
122122
setup();
123123
while(!arduino_should_exit){
124124
loop();
125+
yield();
125126
}
126127
delay(1000);
127128
frec.close();

extras/soundio/save_wav/save_wav.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,7 @@ int main() {
107107
setup();
108108
while(!arduino_should_exit){
109109
loop();
110+
yield();
110111
}
111112
delay(1000);
112113
frec.close();

extras/soundio/sd_play_all/sd_play_all.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,7 @@ int main(int numArgs, char **args) {
140140
setup();
141141
while(!arduino_should_exit){
142142
loop();
143+
yield();
143144
}
144145
delay(1000);
145146
frec.close();

src/AudioEventResponder.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
* SOFTWARE.
2323
*/
2424

25-
#include <AudioEventResponder.h>
25+
#include "AudioEventResponder.h"
2626

2727
using namespace newdigate;
2828

src/AudioEventResponder.h

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ class AudioEventResponder : public EventResponder
3434
static uint8_t active_flags_copy;
3535
static int disableCount;
3636
static bool forceResponse; // if true, we don't change yield_active_check_flags
37-
bool _isPolled;
37+
bool _isPolled = 0;
3838
AudioEventResponder* _aprev,*_anext; // can't use base ones, protected
3939

4040
struct triggeredList {AudioEventResponder* first, *last;};
@@ -168,10 +168,14 @@ class AudioEventResponder : public EventResponder
168168

169169
protected:
170170
static bool disableInterrupts() {
171+
#if !defined(BUILD_FOR_LINUX)
171172
uint32_t primask;
172173
__asm__ volatile("mrs %0, primask\n" : "=r" (primask)::);
173-
__disable_irq();
174+
__disable_irq();
174175
return (primask == 0) ? true : false;
176+
#else
177+
return false;
178+
#endif // !defined(BUILD_FOR_LINUX)
175179
}
176180
static void enableInterrupts(bool doit) {
177181
if (doit) __enable_irq();

0 commit comments

Comments
 (0)