MCPcopy Create free account
hub / github.com/LabSound/LabSound / main

Function main

examples/src/ExamplesMain.cpp:14–68  ·  view source on GitHub ↗

Note for Airpods ~ airpods only present a mono output if the default input device is set to airpods - if you change the input device to the mac book internal microphone, then the airpods work in stereo; strange behavior. https://discussions.apple.com/thread/252088121 */

Source from the content-addressed store, hash-verified

12 https://discussions.apple.com/thread/252088121
13*/
14int main(int argc, char *argv[]) try
15{
16 enum Passing { pass, fail };
17 enum Skip { yes, no };
18 struct Example {
19 Passing passing;
20 Skip skip;
21 labsound_example* example;
22 };
23
24 Example examples[] = {
25 { Passing::pass, Skip::no, new ex_devices() },
26 { Passing::pass, Skip::yes, new ex_play_file() },
27 { Passing::pass, Skip::yes, new ex_simple() },
28 { Passing::pass, Skip::yes, new ex_osc_pop() },
29 { Passing::pass, Skip::yes, new ex_playback_events() },
30 { Passing::pass, Skip::yes, new ex_offline_rendering() },
31 { Passing::pass, Skip::yes, new ex_tremolo() },
32 { Passing::pass, Skip::yes, new ex_frequency_modulation() },
33 { Passing::pass, Skip::yes, new ex_runtime_graph_update() },
34 { Passing::pass, Skip::yes, new ex_microphone_loopback() },
35 { Passing::pass, Skip::yes, new ex_microphone_reverb() },
36 { Passing::pass, Skip::yes, new ex_peak_compressor() },
37 { Passing::pass, Skip::yes, new ex_stereo_panning() },
38 { Passing::pass, Skip::yes, new ex_hrtf_spatialization() },
39 { Passing::pass, Skip::yes, new ex_convolution_reverb() },
40 { Passing::pass, Skip::yes, new ex_misc() },
41 { Passing::pass, Skip::yes, new ex_dalek_filter() },
42 { Passing::pass, Skip::yes, new ex_redalert_synthesis() },
43 { Passing::pass, Skip::yes, new ex_wavepot_dsp() },
44 { Passing::pass, Skip::yes, new ex_granulation_node() }, // note: node is under development
45 { Passing::pass, Skip::yes, new ex_poly_blep() },
46 { Passing::fail, Skip::no, new ex_split_merge() },
47 };
48
49 static constexpr int iterations = 1;
50 for (int i = 0; i < iterations; ++i)
51 {
52 for (auto& example : examples)
53 if (example.skip == Skip::no) {
54 example.example->play(argc, argv);
55 }
56 }
57
58 for (auto& example : examples) {
59 delete example.example;
60 }
61
62 return EXIT_SUCCESS;
63}
64catch (const std::exception & e)
65{
66 std::cerr << "unhandled fatal exception: " << e.what() << std::endl;
67 return EXIT_FAILURE;
68}

Callers

nothing calls this directly

Calls 1

playMethod · 0.45

Tested by

no test coverage detected