aboutsummaryrefslogtreecommitdiff
path: root/src/voice/mod.rs
blob: 283ab36d4687f7afefad698e97aa0ad327132925 (plain) (blame)
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
//! A module for connecting to voice channels.

mod audio;
mod connection;
mod connection_info;
mod dca;
mod error;
mod manager;
mod handler;
mod payload;
mod streamer;
mod threading;

pub use self::{
    audio::{
        Audio, 
        AudioReceiver, 
        AudioSource, 
        AudioType, 
        LockedAudio
    },
    dca::DcaMetadata,
    error::{DcaError, VoiceError},
    handler::Handler,
    manager::Manager,
    streamer::{
        dca, 
        ffmpeg, 
        opus, 
        pcm,
        ytdl
    }
};

use self::connection_info::ConnectionInfo;

const CRYPTO_MODE: &'static str = "xsalsa20_poly1305";

pub(crate) enum Status {
    Connect(ConnectionInfo),
    #[allow(dead_code)] Disconnect,
    SetReceiver(Option<Box<AudioReceiver>>),
    SetSender(Option<LockedAudio>),
    AddSender(LockedAudio),
}