20 lines
672 B
Ziran
20 lines
672 B
Ziran
#import "node_types"
|
|
#import, file "audio_commands.zi";
|
|
host_api :: #system_library "host_api";
|
|
ReadAppHost :: () -> AppMessage #foreign host_api;
|
|
WriteAppHost :: (message: AppMessage) #foreign host_api;
|
|
ReadAppUiHost :: () -> AppUiFrame #foreign host_api;
|
|
|
|
#program_export
|
|
Main :: () -> s32 {
|
|
message := ReadAppHost()
|
|
if message.abi != MODULE_ABI { return -1 }
|
|
if message.action == MODULE_IDENTIFY { return MODULE_NODE_APP }
|
|
if message.action == APP_FRAME {
|
|
frame := ReadAppUiHost()
|
|
message.succeeded = AudioFixture(frame.session, frame.width - 100, cast(MediaAudioCode)(frame.height - 100))
|
|
}
|
|
WriteAppHost(message)
|
|
return 0
|
|
}
|