I made a music player in wpf using cscore. Now, I want to add a feature so I can stream the output in real-time (like a radio) to another instance of the music player over internet. I could see how to stream the data later, but first I need to know how to get the bytes of the audio output. I'm asking for help because I'm lost, I've done some research and found nothing but how to stream the desktop audio. That's not a solution, because I want to listen to the same music with some friends while hanging out on Discord, so if I stream the desktop audio, they will listen to themselves besides the music. Any help will be welcome. Thanks in advance!
How do I capture the audio of a wpf window or cscore output in c#?
378 Views Asked by Kleylux At
1
There are 1 best solutions below
Related Questions in WPF
- WPF MessageBox Cancel checkbox check
- WPF multiple control property simultaneous changes
- ObservableCollection.CollectionChanged does not select the correct DataTemplate on ToolBar
- Telerik's WPF RadColorPicker NoColorText property not working
- How to automate UI interaction during acceptance test run
- Binding to "this.property" object in VisualStateMenager
- ContextMenu Closes Immediately
- Update ObservableCollection where the items are received from another List
- change content button with trigger
- WPF - How to highlight a combobox border when focused
- Wpf No Highlight on ListBoxItem for Touch Devices
- WPF WebBrowser how best to get Tag trees
- Make a class suitable for Property Change Notification
- WPF Comparing two datatables to find matching values
- how to create folder and file with datetime in wpf application
Related Questions in AUDIO
- Play multiple audio files in a slider
- Unity3d AudioSource not creatable
- JavaFX can't play mp3 files
- iPhone simultaneous sound output
- Phonegap Build App - Play Audio
- HTML5 Audio pause not working
- Java boolean play button issue (play over and over again with each click)
- import a sound externally or from the library? AS3
- Set audio source
- Saving a sound bite as a ringtone
- Using OnAudioFilterRead with playOnAwake
- Audio recorded with Samsung does not play on iOS
- fftw of 16bit Audio :: peak appearing wrong at 2f
- How to Export an audio file with effect in iOS
- Tried multiple solutions onsite, none worked: Play <audio> on Konami code
Related Questions in LIVE-STREAMING
- using livestream video in iOS application
- Ustream API to show channel Status
- Is transmitting PES(Packetised Elementary Stream) better or MPEG-TS in Live Streaming from mobile (IOS) to server
- HTML5 Video element does not a resume live streaming when a stream is interrupted then restarts
- HTML5 video element does not restart a live stream at its live point if I pause it
- Stream video from phone camera using ionic framework
- Embed m3u8 with flowplayer using JS
- Android : How to record a live stream video using ExoPlayer lib
- Live555 RTSPServer object destroyed improperly or the library bug?
- Stream webcam via. Wowza streaming server
- Basic concept on live-streaming video
- Read stream from Facebook Live Videos
- FFMPEG Streaming updated image in loop to FB Live Video
- How to Capture Live Stream from camera and watch live or save for later viewing?
- How online radio live stream music and are there available resources to build one with Node.js?
Related Questions in AUDIO-PLAYER
- Looping playback of a list of Gst.Sample with GstApp.AppSrc
- Adding audio player to a node in SceneKit
- ttwMusicPlayer action on play button
- onended audio event firing without playing the audio
- Soundcloud js api. Can't stop playing
- Error with SQLite in Android
- Play/pause using howler.js with meteor framework
- How do you dynamically add new instruments to AUGraph
- Indexlist in uitableView not working
- How to get the Metadata of songs played in MusicPlayer in Qml
- How to get all .mp3 files from raw folder to custom array listview and play that song?
- Audioplayer not sync with Fragments in ViewPager
- Music player - activity lifecycle
- No smooth music during activities switching
- Is it possible to "overload" the dbus Get Properties command?
Related Questions in CSCORE
- CSCore - Convert stereo to surround
- Ducking Notifications When Playing a sound
- Cannot build CSCORE in VS2019 - ilasm failure in post build
- Get processname or ID from CSCore audiostream
- How do I capture the audio of a wpf window or cscore output in c#?
- Speech recognition with Microsoft Cognitive Speech API and non-microphone real-time audio stream
- using an Audio Endpoint other than 'DefaultAudioEndpoint' in C#
- Getting individual windows application current volume output level as visualized in audio Mixer
- Length in time of a wave file
- Change volume of specific app with CSCore
- CSCore with audio through a GoXLR
- Wasapi audio quality
- CSCore Application Audio Mixer Name+Peak
- CSCore loopback recording when muted
- How to play the same sound twice in parallel in CSCore?
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
I am have not used cscore I mainly use naudio a similar library that facilitates getting audio to and from the sound card. So I will try and answer in a way that allows you to find what you are looking for in cscore.
In your player code you will be pulling data from the audio file. In naudio this is done with a audio file reader. I think it is called a wavFileReader in cscore, This file reader translates the audio file into a stream of audio samples in the form of byte arrays, the byte arrays are then used to feed the WASAPI Out to allow the audio to play on the sound card.
The ideal place to start with your streaming system would be in the middle of those two processes. So rather than just passing the audio samples to the sound card you need to take a copy of the byte array containing the samples. it is this data you will need to stream to your friends.
From here you will need to look at compressing the audio and streaming protocols like RTP all can be done in c#. The issue will be, as it always is in audio having your data stream keep pace with the sound card. Every time WASAPIOut asks for more samples you need to have the ready otherwise the audio will be choppy.
I do hope this helps point you in the right direction. Others with experience with cscore may have some code examples to assist you more directly I am simply trying to point you in the right direction