Skip to content

Commit

Permalink
Cleanup.
Browse files Browse the repository at this point in the history
  • Loading branch information
sletz committed Jan 12, 2025
1 parent 2b04631 commit 5a23e94
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 26 deletions.
14 changes: 0 additions & 14 deletions src/compilefaust.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,17 +41,6 @@ export function workletAvailable() {
return context.audioWorklet && typeof context.audioWorklet.addModule === 'function';
}

// Do no keep more than 10 alive DSP factories
/*
function checkFactoryStack(factory) {
if (factory && factory_stack.indexOf(factory) === -1) {
factory_stack.push(factory);
if (factory_stack.length >= 10) {
faust.deleteDSPFactory(factory_stack.shift());
}
}
}
*/
export function deleteDSP() {
if (DSP) {
if (audio_input) {
Expand Down Expand Up @@ -182,9 +171,6 @@ export function expandDSP(dsp_code) {
var argv = [];
argv.push("-ftz");
argv.push(ftz_flag);
// argv.push("-I");
// Libraries are now included and loaded from the EMCC locale FS included in libfaust
// argv.push("libraries");
console.log(argv);

return faust_compiler.expandDSP(dsp_code, argv.join(" "));
Expand Down
7 changes: 0 additions & 7 deletions src/faustlive.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ import { audio_context, compileDSP, deleteDSP, DSP, expandDSP, workletAvailable
import { getStorageItemValue } from "./localStorage"

export var dsp_code = '';
var base_url = ''; // TODO(ijc): unused?

const docPath = 'https://faustlibraries.grame.fr/libs/';
const docSections = {
Expand Down Expand Up @@ -94,10 +93,6 @@ function uploadOn(e, callback) {
e.dataTransfer.getData('URL').split(':').shift() != 'file') {
var url = e.dataTransfer.getData('URL');

// Get base URL
var url_str = url.toString();
base_url = url_str.substring(0, url_str.lastIndexOf('/')) + '/';

// Get filename
var filename = url.toString().split('/').pop();
console.log('filename is : ', filename);
Expand Down Expand Up @@ -181,12 +176,10 @@ function uploadFile(e) {
function fileDragHover(e) {
e.stopPropagation();
e.preventDefault();
/*e.target.className = (e.type === "dragover" ? "hover" : "");*/
}

function updateDSPCode() {
codeEditor.setValue(dsp_code);
// console.log("FAUST CODE:", codeEditor.getValue());
}

function configureDropZone(zoneid) {
Expand Down
5 changes: 0 additions & 5 deletions src/localStorage.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,3 @@ export function setStorageItemValue(item_key, key, value) {
localStorage.setItem(item_key, JSON.stringify(item_value));
}

//get value of 'item_key'
// TODO(ijc): Unused?
function getStorageItem(item_key) {
return (localStorage.getItem(item_key)) ? JSON.parse(localStorage.getItem(item_key)) : null;
}

0 comments on commit 5a23e94

Please sign in to comment.