File tree Expand file tree Collapse file tree 5 files changed +15
-8
lines changed Expand file tree Collapse file tree 5 files changed +15
-8
lines changed Original file line number Diff line number Diff line change @@ -72,7 +72,7 @@ class MicrophoneDriverAVFoundation : public MicrophoneDriver {
7272 virtual void deactivate_feed (Ref<MicrophoneFeed> p_feed) override;
7373
7474 virtual void set_monitoring_feeds (bool p_monitoring_feeds) override;
75- virtual bool get_monitoring_feeds () const override;
75+ virtual bool is_monitoring_feeds () const override;
7676
7777 virtual String get_name () const override { return String (" AVFoundation" ); }
7878
Original file line number Diff line number Diff line change 8383 device_notifications = [[MicrophoneDeviceNotification alloc ] initForDriver: this ];
8484}
8585
86- bool MicrophoneDriverAVFoundation::get_monitoring_feeds () const {
86+ bool MicrophoneDriverAVFoundation::is_monitoring_feeds () const {
8787 return device_notifications != nil ;
8888}
8989
Original file line number Diff line number Diff line change @@ -53,7 +53,7 @@ class MicrophoneDriver {
5353 virtual void deactivate_feed (Ref<MicrophoneFeed> p_feed) = 0;
5454
5555 virtual void set_monitoring_feeds (bool p_monitoring_feeds) = 0;
56- virtual bool get_monitoring_feeds () const = 0;
56+ virtual bool is_monitoring_feeds () const = 0;
5757
5858 virtual String get_name () const = 0;
5959 virtual Error init ();
@@ -68,7 +68,7 @@ class MicrophoneDriverDummy : public MicrophoneDriver {
6868 virtual void update_feeds () {}
6969
7070 virtual void set_monitoring_feeds (bool p_monitoring_feeds) {}
71- virtual bool get_monitoring_feeds () const { return false ; }
71+ virtual bool is_monitoring_feeds () const { return false ; }
7272 virtual bool activate_feed (Ref<MicrophoneFeed> p_feed) { return false ; }
7373 virtual void deactivate_feed (Ref<MicrophoneFeed> p_feed) {}
7474
Original file line number Diff line number Diff line change 3131#include " microphone_server.h"
3232
3333#include " core/variant/typed_array.h"
34+ #include " servers/microphone/microphone_driver.h"
3435#include " servers/microphone/microphone_feed.h"
3536
3637MicrophoneServer *MicrophoneServer::singleton = nullptr ;
3738
39+ void MicrophoneServer::set_monitoring_feeds (bool p_monitoring_feeds) {
40+ MicrophoneDriver::get_singleton ()->set_monitoring_feeds (p_monitoring_feeds);
41+ }
42+
43+ bool MicrophoneServer::is_monitoring_feeds () const {
44+ return MicrophoneDriver::get_singleton ()->is_monitoring_feeds ();
45+ }
46+
3847int MicrophoneServer::get_free_id () {
3948 bool id_exists = true ;
4049 int newid = 0 ;
Original file line number Diff line number Diff line change @@ -52,8 +52,8 @@ class MicrophoneServer : public Object {
5252public:
5353 static MicrophoneServer *get_singleton () { return singleton; }
5454
55- virtual void set_monitoring_feeds (bool p_monitoring_feeds) { monitoring_feeds = p_monitoring_feeds; }
56- _FORCE_INLINE_ bool is_monitoring_feeds () const { return monitoring_feeds; }
55+ virtual void set_monitoring_feeds (bool p_monitoring_feeds);
56+ bool is_monitoring_feeds () const ;
5757
5858 // Right now we identify our feed by it's ID when it's used in the background.
5959 // May see if we can change this to purely relying on MicrophoneFeed objects or by name.
@@ -70,8 +70,6 @@ class MicrophoneServer : public Object {
7070 int get_feed_count ();
7171 TypedArray<MicrophoneFeed> get_feeds ();
7272
73- MicrophoneServer *create (int p_microphone_driver_index);
74-
7573 void init ();
7674
7775 MicrophoneServer ();
You can’t perform that action at this time.
0 commit comments