Commit b0fc8008 authored by pokergaming's avatar pokergaming
Browse files

added audio api dropdown

parent 9448f4ab
......@@ -23,6 +23,8 @@
<fieldset id="audio">
<legend data-i18n="prefs.heading.audio"></legend>
<select id="audio_api">
</select>
Audio stuff
</fieldset>
......@@ -311,9 +313,21 @@ pdgui.gui_post("guistub is " + gfxstub);
}
}
function populate_audio_apis(apis) {
var i, opt, api_select = document.getElementById('audio_api');
pdgui.gui_post('apis are ' + apis);
for (i = 0; i < apis.length; i += 2) {
opt = document.createElement('option');
opt.textContent = apis[i];
opt.setAttribute('value', apis[i+1]);
api_select.appendChild(opt);
}
}
function audio_prefs_callback(attrs) {
pdgui.gui_post("audio attrs are " + attrs);
pdgui.gui_post("audio attrs FUCK " + attrs);
pdgui.gui_post("attrs length " + attrs.length);
populate_audio_apis(attrs[attrs.indexOf('audio_apis') + 1]);
}
function midi_prefs_callback(attrs) {
......
......@@ -3273,8 +3273,11 @@ function gui_pd_dsp(state) {
}
function open_prefs() {
dialogwin['prefs'] = nw_create_window('prefs', 'prefs', 265, 540, 20, 20, 0,
0, 1, 'white', 'Properties', '', 0, null, null);
if (!dialogwin['prefs']) {
dialogwin['prefs'] = nw_create_window('prefs', 'prefs',
265, 540, 20, 20, 0,
0, 1, 'white', 'Properties', '', 0, null, null);
}
}
exports.open_prefs = open_prefs;
......
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