UNPKG

expo-sound-analysis

Version:
23 lines 780 B
import ExpoSoundAnalyzer from "./SoundAnalyzer"; export class SoundAnalyzer { static async startAnalysis() { return await ExpoSoundAnalyzer.startAnalysis(); } static async stopAnalysis() { return await ExpoSoundAnalyzer.stopAnalysis(); } static async analyzeFile(uri) { try { const results = await ExpoSoundAnalyzer.analyzeFile(uri); return results; // Return the results array } catch (error) { console.error("Error analyzing file:", error); throw error; // Re-throw the error for upstream handling } } static addSoundListener(listener) { return ExpoSoundAnalyzer.addListener("onSoundDetected", listener); } } //# sourceMappingURL=index.js.map