Commit 4f6cd1e9 authored by pokergaming's avatar pokergaming
Browse files

show default api in prefs dropdown

parent b0fc8008
......@@ -313,7 +313,8 @@ pdgui.gui_post("guistub is " + gfxstub);
}
}
function populate_audio_apis(apis) {
function populate_audio_apis(apis, current_api) {
pdgui.gui_post("curent api is " + current_api);
var i, opt, api_select = document.getElementById('audio_api');
pdgui.gui_post('apis are ' + apis);
for (i = 0; i < apis.length; i += 2) {
......@@ -322,12 +323,14 @@ pdgui.gui_post("guistub is " + gfxstub);
opt.setAttribute('value', apis[i+1]);
api_select.appendChild(opt);
}
api_select.value = current_api;
}
function audio_prefs_callback(attrs) {
pdgui.gui_post("audio attrs FUCK " + attrs);
pdgui.gui_post("audio attrs are " + attrs);
pdgui.gui_post("attrs length " + attrs.length);
populate_audio_apis(attrs[attrs.indexOf('audio_apis') + 1]);
populate_audio_apis(attrs[attrs.indexOf('audio-apis') + 1],
attrs[attrs.indexOf('current-api') + 1]);
}
function midi_prefs_callback(attrs) {
......
......@@ -3286,13 +3286,13 @@ function gui_audio_properties(gfxstub, sys_indevs, sys_outdevs,
pd_indevs, pd_inchans, pd_outdevs, pd_outchans, audio_attrs) {
var attrs = audio_attrs.concat([
"audio_apis", pd_apilist,
"sys_indevs", sys_indevs,
"sys_outdevs", sys_outdevs,
"pd_indevs", pd_indevs,
"pd_inchans", pd_inchans,
"pd_outdevs", pd_outdevs,
"pd_outchans", pd_outchans
"audio-apis", pd_apilist,
"sys-indevs", sys_indevs,
"sys-outdevs", sys_outdevs,
"pd-indevs", pd_indevs,
"pd-inchans", pd_inchans,
"pd-outdevs", pd_outdevs,
"pd-outchans", pd_outchans
]);
gui_post("got back some audio props...");
......@@ -3312,11 +3312,11 @@ function gui_midi_properties(gfxstub, sys_indevs, sys_outdevs,
pd_indevs, pd_outdevs, midi_attrs) {
var attrs = midi_attrs.concat([
"midi_apis", pd_midiapilist,
"sys_indevs", sys_indevs,
"sys_outdevs", sys_outdevs,
"pd_indevs", pd_indevs,
"pd_outdevs", pd_outdevs,
"midi-apis", pd_midiapilist,
"sys-indevs", sys_indevs,
"sys-outdevs", sys_outdevs,
"pd-indevs", pd_indevs,
"pd-outdevs", pd_outdevs,
]);
gui_post("got back some midi props...");
......
......@@ -809,6 +809,8 @@ void glob_audio_properties(t_pd *dummy, t_floatarg flongform)
gui_s("cancallback"); gui_i(cancallback ? callback : -1);
gui_s("flongform"); gui_i(flongform != 0);
gui_s("blocksize"); gui_i(blocksize);
gui_s("current-api"); gui_i(sys_audioapi); // cannot figure out how this
// originally got set
gui_end_array();
gui_end_vmess();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment