Open-source voice framework vchat

Source: Internet
Author: User

In the past, voice chat was performed in frozen battles. At that time, voicechat was transplanted for the progress. However, in terms of code quality, voicechat is not well designed, especially as a general chat framework, and is not easy to use. Now we have no time to rewrite a new voice chat library.

On the interface, devices is provided to traverse devices.

class devices{public:static std::vector<const PaDeviceInfo*> getInputDevices();static std::vector<const PaDeviceInfo*> getOutputDevices();};

Sound is provided for audio setting.

class sound{public:    sound();    ~sound();    void start();    void stop();    void th_func();    boost::signals2::signal<void(char *, int)> sigCapture;        bool setOutputDevice(PaDeviceIndex index);    bool setInputDevice(PaDeviceIndex index);    void setsoundsize();    void setechostate(bool on);private:    static int inputcallback(const void *input, void *output, unsigned long frameCount, const PaStreamCallbackTimeInfo *timeInfo,                             PaStreamCallbackFlags statusFlags, void *userData);    static int outputcallback(const void *input, void *output, unsigned long frameCount, const PaStreamCallbackTimeInfo *timeInfo,                               PaStreamCallbackFlags statusFlags, void *userData);private:    };

Provides a client for managing multi-user chats.

client * create_client(int index = 0);client * get_client(int index);typedef void(*handle_iterator_client)(std::map<int, client*> & set);void iterator_client_set(handle_iterator_client fn);void iterator_client_set(std::function<void(std::map<int, client*> &) > fn);bool destroy_client(int index);int client_count();

The client provides write_buff and read_buff to operate the buffer.

Relatively speaking, the interface is much clearer than voicechat.

 

Address: https://github.com/qianqians/vchat.git

 

Open-source voice framework vchat

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.