forked from tv2/sisyfos-audio-controller
-
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.
feat: preparing multiple mixer connections in channel store.
chore: refactor channel store with Action Creators for better type safety
- Loading branch information
olzzon
authored and
olzzon
committed
Oct 4, 2020
1 parent
475176a
commit c1ba41d
Showing
22 changed files
with
822 additions
and
509 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,77 @@ | ||
import { IChannel, IChannels } from './channelsReducer' | ||
|
||
export const SET_OUTPUT_LEVEL = 'SET_OUTPUT_LEVEL' | ||
export const SET_AUX_LEVEL = 'SET_AUX_LEVEL' | ||
export const SET_COMPLETE_CH_STATE = 'SET_COMPLETE_CH_STATE' | ||
export const SET_SINGLE_CH_STATE = 'SET_SINGLE_CH_STATE' | ||
export const FADE_ACTIVE = 'FADE_ACTIVE' | ||
export const SET_ASSIGNED_FADER = 'SET_ASSIGNED_FADER' | ||
export const SET_PRIVATE = 'SET_PRIVATE' | ||
|
||
export const storeSetOutputLevel = (channel: number, level: number) => { | ||
return { | ||
type: SET_OUTPUT_LEVEL, | ||
channel: channel, | ||
level: level, | ||
} | ||
} | ||
|
||
export const storeSetAuxLevel = ( | ||
channel: number, | ||
auxIndex: number, | ||
level: number | ||
) => { | ||
return { | ||
type: SET_AUX_LEVEL, | ||
channel: channel, | ||
auxIndex: auxIndex, | ||
level: level, | ||
} | ||
} | ||
|
||
export const storeSetCompleteChState = ( | ||
allState: IChannels, | ||
numberOfTypeChannels: number[] | ||
) => { | ||
return { | ||
type: SET_COMPLETE_CH_STATE, | ||
allState: allState, | ||
numberOfTypeChannels: numberOfTypeChannels, | ||
} | ||
} | ||
|
||
export const storeSetSingleChState = ( | ||
channelIndex: number, | ||
state: IChannel | ||
) => { | ||
return { | ||
type: SET_SINGLE_CH_STATE, | ||
channelIndex: channelIndex, | ||
state: state, | ||
} | ||
} | ||
|
||
export const storeFadeActive = (channelIndex: number, active: boolean) => { | ||
return { | ||
type: FADE_ACTIVE, | ||
channel: channelIndex, | ||
active: active, | ||
} | ||
} | ||
|
||
export const storeSetAssignedFader = (channel: number, faderNumber: number) => { | ||
return { | ||
type: SET_ASSIGNED_FADER, | ||
channel: channel, | ||
faderNumber: faderNumber, | ||
} | ||
} | ||
|
||
export const storeSetChPrivate = (channel: number, tag: string, value: any) => { | ||
return { | ||
type: SET_PRIVATE, | ||
channel: channel, | ||
tag: tag, | ||
value: value, | ||
} | ||
} |
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
Oops, something went wrong.