Spaces:
Running
Running
File size: 791 Bytes
3a150da |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 |
const SET_SOUND_EDITOR_WAVEFORM_CHUNK_SIZE = 'scratch-gui/addon-util/SET_SOUND_EDITOR_WAVEFORM_CHUNK_SIZE';
const initialState = {
soundEditorWaveformChunkSize: 1024,
};
const reducer = function (state, action) {
if (typeof state === 'undefined') state = initialState;
switch (action.type) {
case SET_SOUND_EDITOR_WAVEFORM_CHUNK_SIZE:
return {
soundEditorWaveformChunkSize: action.chunkSize
};
default:
return state;
}
};
const setSoundEditorWaveformChunkSize = function (chunkSize) {
return {
type: SET_SOUND_EDITOR_WAVEFORM_CHUNK_SIZE,
chunkSize: chunkSize
};
};
export {
reducer as default,
initialState as addonUtilInitialState,
setSoundEditorWaveformChunkSize
}; |