- Sponsor
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* refactor: refactored types * feat: added AudioParam missing methods * docs: update API coverage docs * refactor: switch priority queue to deque * feat: added all AudioParam methods to index.ts --------- Co-authored-by: Maciej Makowski <maciej.makowski@swmansion.com>
1 parent
ac2e8d6
commit 7b88f68
Showing
17 changed files
with
452 additions
and
159 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
46 changes: 0 additions & 46 deletions
46
packages/react-native-audio-api/common/cpp/core/ParamChange.cpp
This file was deleted.
Oops, something went wrong.
58 changes: 58 additions & 0 deletions
58
packages/react-native-audio-api/common/cpp/core/ParamChangeEvent.cpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
#include "ParamChangeEvent.h" | ||
|
||
#include <utility> | ||
|
||
namespace audioapi { | ||
|
||
ParamChangeEvent::ParamChangeEvent( | ||
double startTime, | ||
double endTime, | ||
float startValue, | ||
float endValue, | ||
std::function<float(double, double, float, float, double)> calculateValue, | ||
ParamChangeEventType type) | ||
: startTime_(startTime), | ||
endTime_(endTime), | ||
startValue_(startValue), | ||
endValue_(endValue), | ||
calculateValue_(std::move(calculateValue)), | ||
type_(type) {} | ||
|
||
double ParamChangeEvent::getEndTime() const { | ||
return endTime_; | ||
} | ||
|
||
double ParamChangeEvent::getStartTime() const { | ||
return startTime_; | ||
} | ||
|
||
float ParamChangeEvent::getEndValue() const { | ||
return endValue_; | ||
} | ||
|
||
float ParamChangeEvent::getStartValue() const { | ||
return startValue_; | ||
} | ||
|
||
std::function<float(double, double, float, float, double)> | ||
ParamChangeEvent::getCalculateValue() const { | ||
return calculateValue_; | ||
} | ||
|
||
ParamChangeEventType ParamChangeEvent::getType() const { | ||
return type_; | ||
} | ||
|
||
void ParamChangeEvent::setEndTime(double endTime) { | ||
endTime_ = endTime; | ||
} | ||
|
||
void ParamChangeEvent::setStartValue(float startValue) { | ||
startValue_ = startValue; | ||
} | ||
|
||
void ParamChangeEvent::setEndValue(float endValue) { | ||
endValue_ = endValue; | ||
} | ||
|
||
} // namespace audioapi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 0 additions & 4 deletions
4
packages/react-native-audio-api/common/cpp/types/BiquadFilterType.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 0 additions & 3 deletions
3
packages/react-native-audio-api/common/cpp/types/ChannelCountMode.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 0 additions & 3 deletions
3
packages/react-native-audio-api/common/cpp/types/ChannelInterpretation.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 0 additions & 3 deletions
3
packages/react-native-audio-api/common/cpp/types/ContextState.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 0 additions & 4 deletions
4
packages/react-native-audio-api/common/cpp/types/OscillatorType.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 13 additions & 0 deletions
13
packages/react-native-audio-api/common/cpp/types/ParamChangeEventType.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#pragma once | ||
|
||
namespace audioapi { | ||
|
||
enum class ParamChangeEventType { | ||
LINEAR_RAMP, | ||
EXPONENTIAL_RAMP, | ||
SET_VALUE, | ||
SET_TARGET, | ||
SET_VALUE_CURVE, | ||
}; | ||
|
||
} // namespace audioapi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters