diff --git a/src/app/context/ApplicationConfigContext.tsx b/src/app/context/ApplicationConfigContext.tsx index 46bad56..b167045 100644 --- a/src/app/context/ApplicationConfigContext.tsx +++ b/src/app/context/ApplicationConfigContext.tsx @@ -2,7 +2,7 @@ import { createContext, useContext, useState, ReactNode, FC, useEffect } from "react"; import { AudioEditor, EventType, Constants } from "@eliastik/simple-sound-studio-lib"; -import { ApplicationObjectsSingleton } from "@eliastik/simple-sound-studio-components"; +import { SoundStudioApplicationFactory } from "@eliastik/simple-sound-studio-components"; import i18n from "@eliastik/simple-sound-studio-components/lib/i18n"; import i18next from "i18next"; import ApplicationConfigContextProps from "../model/contextProps/ApplicationConfigContextProps"; @@ -29,7 +29,7 @@ const getService = (): ApplicationConfigService => { }; const getAudioEditor = (): AudioEditor => { - return ApplicationObjectsSingleton.getAudioEditorInstance()!; + return SoundStudioApplicationFactory.getAudioEditorInstance()!; }; let isReady = false; diff --git a/src/app/context/AudioRecorderContext.tsx b/src/app/context/AudioRecorderContext.tsx index a738a74..be96677 100644 --- a/src/app/context/AudioRecorderContext.tsx +++ b/src/app/context/AudioRecorderContext.tsx @@ -1,7 +1,7 @@ "use client"; import { createContext, useContext, useState, ReactNode, FC, useEffect } from "react"; -import { ApplicationObjectsSingleton } from "@eliastik/simple-sound-studio-components"; +import { SoundStudioApplicationFactory } from "@eliastik/simple-sound-studio-components"; import { VoiceRecorder, EventType, RecorderSettings } from "@eliastik/simple-sound-studio-lib"; import AudioRecorderContextProps from "../model/contextProps/AudioRecorderContextProps"; @@ -20,7 +20,7 @@ interface AudioRecorderProviderProps { } const getRecorderInstance = (): VoiceRecorder => { - return ApplicationObjectsSingleton.getAudioRecorderInstance()!; + return SoundStudioApplicationFactory.getAudioRecorderInstance()!; }; let isReady = false; diff --git a/src/app/page.tsx b/src/app/page.tsx index 2f58a11..e8f27ee 100644 --- a/src/app/page.tsx +++ b/src/app/page.tsx @@ -2,7 +2,7 @@ import { useEffect } from "react"; import MainComponent from "./components/MainComponent"; -import { ApplicationObjectsSingleton, useAudioEditor } from "@eliastik/simple-sound-studio-components"; +import { SoundStudioApplicationFactory, useAudioEditor } from "@eliastik/simple-sound-studio-components"; import { useApplicationConfig } from "./context/ApplicationConfigContext"; import ApplicationConfigSingleton from "./context/ApplicationConfigSingleton"; import Constants from "./model/Constants"; @@ -13,7 +13,7 @@ const Home = () => { useEffect(() => { // Initialize SoundStudioApplicationFactory - ApplicationObjectsSingleton.initializeApplicationObjects(ApplicationConfigSingleton.getConfigServiceInstance(), Constants.AUDIO_BUFFERS_TO_FETCH); + SoundStudioApplicationFactory.initializeApplication(ApplicationConfigSingleton.getConfigServiceInstance(), Constants.AUDIO_BUFFERS_TO_FETCH); }, []); useEffect(() => {