-
Notifications
You must be signed in to change notification settings - Fork 10
/
AudioMixInputStreamChannel.ts
49 lines (42 loc) · 1.37 KB
/
AudioMixInputStreamChannel.ts
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
import {map, mapArray} from '../common/Mapper';
import AudioMixChannelType from './AudioMixChannelType';
import AudioMixInputStreamSourceChannel from './AudioMixInputStreamSourceChannel';
/**
* @export
* @class AudioMixInputStreamChannel
*/
export class AudioMixInputStreamChannel {
/**
* The id of the input stream that should be used for mixing.
* @type {string}
* @memberof AudioMixInputStreamChannel
*/
public inputStreamId?: string;
/**
* @type {AudioMixChannelType}
* @memberof AudioMixInputStreamChannel
*/
public outputChannelType?: AudioMixChannelType;
/**
* Number of this output channel. If type is 'CHANNEL_NUMBER', this must be set.
* @type {number}
* @memberof AudioMixInputStreamChannel
*/
public outputChannelNumber?: number;
/**
* List of source channels to be mixed
* @type {AudioMixInputStreamSourceChannel[]}
* @memberof AudioMixInputStreamChannel
*/
public sourceChannels?: AudioMixInputStreamSourceChannel[];
constructor(obj?: Partial<AudioMixInputStreamChannel>) {
if(!obj) {
return;
}
this.inputStreamId = map(obj.inputStreamId);
this.outputChannelType = map(obj.outputChannelType);
this.outputChannelNumber = map(obj.outputChannelNumber);
this.sourceChannels = mapArray(obj.sourceChannels, AudioMixInputStreamSourceChannel);
}
}
export default AudioMixInputStreamChannel;