Git Product home page Git Product logo

simpleprotocolserver's Introduction

Simple Protocol Server

This is a server that sends all the available sound card audio from a Windows PC to the network. This is meant to be the Windows counterpart to the simple protocol module in PulseAudio. The simple protocol streams uncompressed 16 bit 2 channel PCM data.

The server is meant to be used with the Simple Protocol Player client on Android. The play store link is here: https://play.google.com/store/apps/details?id=com.kaytat.simpleprotocolplayer .

The client source is here: https://github.com/kaytat/SimpleProtocolPlayer

WSAPI Loopback

The server uses the Windows Audio Session API to capture the audio. And for each audio frame, it sends that data to the connected client.

The code is a simple modification to an existing MSDN example: http://blogs.msdn.com/b/matthew_van_eerde/archive/2014/11/05/draining-the-wasapi-capture-buffer-fully.aspx . Instead of writing the data to a MMIO file, the data is send over a socket.

Limitations

One client only

Although PulseAudio's module will allow multiple connections, this server does not.

No XP support

I've only tested this with one Win7 machine. And it doesn't seem to work with XP.

The Win7 machine was recently upgraded to Win10 and that seems to work.

Sampling rate / format

The Android app supports 4 sampling frequencies - 48, 44.1, 24, and 22.05kHz and both stereo and mono. The app assumes 16-bit samples.

My sound card doesn't support the lower sampling rates and so the server has a command line option to use an integer divider to downsample.

The sampling rate may need to be manually adjusted by the user since the default format may not be a format supported by the Android app. To do this, the user will need to manually configure the properties in the "Advanced" tab of the playback device. Please also see this: http://kaytat.com/blog/?p=332

Usage

simpleserver.exe [--device "Device long name"] [--mono] [--div divisor]

-? prints this message.
--list-devices displays the long names of all active playback devices.
--device captures from the specified device (default if omitted)
--mono convert from stereo to mono
--div divisor reduce sample rate by a factor of divisor

simpleprotocolserver's People

Contributors

kaytat avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.