Skip to content

Commit

Permalink
Rebase changes to pure virtual functions implemented in sndfile sourc…
Browse files Browse the repository at this point in the history
…e and sink
  • Loading branch information
Hrick87 committed Feb 8, 2024
1 parent 52af897 commit 091cea3
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,14 @@ bool SndfileSink::open(const char* driver, const char* path) {
return true;
}

ISink* SndfileSink::to_sink() {
return this;
}

ISource* SndfileSink::to_source() {
return NULL;
}

DeviceType SndfileSink::type() const {
return DeviceType_Sink;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,12 @@ class SndfileSink : public ISink, public core::NonCopyable<> {
//! If @p driver or @p path are NULL, defaults are used.
bool open(const char* driver, const char* path);

//! Cast IDevice to ISink.
virtual ISink* to_sink();

//! Cast IDevice to ISink.
virtual ISource* to_source();

//! Get device type.
virtual DeviceType type() const;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,14 @@ bool SndfileSource::open(const char* driver, const char* path) {
return true;
}

ISink* SndfileSource::to_sink() {
return NULL;
}

ISource* SndfileSource::to_source() {
return this;
}

DeviceType SndfileSource::type() const {
return DeviceType_Source;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,12 @@ class SndfileSource : public ISource, private core::NonCopyable<> {
//! If @p driver or @p path are NULL, defaults are used.
bool open(const char* driver, const char* path);

//! Cast IDevice to ISink.
virtual ISink* to_sink();

//! Cast IDevice to ISink.
virtual ISource* to_source();

//! Get device type.
virtual DeviceType type() const;

Expand Down

0 comments on commit 091cea3

Please sign in to comment.