| 26 | |
| 27 | |
| 28 | class JsonAudioImpl { |
| 29 | public: |
| 30 | JsonAudioImpl(const fl::string &name) FL_NOEXCEPT; |
| 31 | JsonAudioImpl(const fl::string &name, const fl::url& url) FL_NOEXCEPT; |
| 32 | JsonAudioImpl(const fl::string &name, const fl::audio::Config& config) FL_NOEXCEPT; |
| 33 | ~JsonAudioImpl(); |
| 34 | JsonAudioImpl &Group(const fl::string &name) FL_NOEXCEPT; |
| 35 | |
| 36 | const fl::string &name() const FL_NOEXCEPT; |
| 37 | audio::Sample next() FL_NOEXCEPT; |
| 38 | bool hasNext() FL_NOEXCEPT; |
| 39 | fl::string groupName() const FL_NOEXCEPT; |
| 40 | |
| 41 | // Method to allow parent UIElement class to set the group |
| 42 | void setGroup(const fl::string &groupName) FL_NOEXCEPT; |
| 43 | |
| 44 | // Stub: no underlying audio input for JSON UI |
| 45 | fl::shared_ptr<audio::IInput> audioInput() FL_NOEXCEPT { return nullptr; } |
| 46 | |
| 47 | int id() const FL_NOEXCEPT { |
| 48 | return mInternal->id(); |
| 49 | } |
| 50 | |
| 51 | private: |
| 52 | fl::shared_ptr<JsonUiAudioInternal> mInternal; |
| 53 | struct Updater : fl::EngineEvents::Listener { |
| 54 | void init(JsonAudioImpl *owner) FL_NOEXCEPT; |
| 55 | ~Updater(); |
| 56 | void onPlatformPreLoop2() FL_NOEXCEPT override; |
| 57 | JsonAudioImpl *mOwner = nullptr; |
| 58 | }; |
| 59 | Updater mUpdater; |
| 60 | }; |
| 61 | |
| 62 | |
| 63 | |