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#?
379 views Asked by Kleylux At
1
There are 1 answers
Related Questions in WPF
- Sorting a List by its property renames all the objects in the List
- Can't open new instance of another window in my app, in WPF .NET 8
- Binding forecolour and ToolTip to a DataGrid
- how to create Infinite Upgrades in a clicker game
- Try Catch exception is not catching the unhandled exception
- Assigning an object to another doesn't raise PropertyChanged event in WPF
- Masking input in TextBox
- What should I do if Visual Studio has a restriction on creating files with a long name or a long path to these files?
- reading configuration file (mytest.exe.config)
- WPF Windows Initializing is locking the separated thread in .Net 8
- How to bind to the DataContext ViewModel of another view?
- mouse coordinates in image go below 0 and above width
- WPF pop up is behaving differently in English language PC and Japanese language PC
- Multi level project reference using dll
- Unable to unzip archive .NET framework
Related Questions in AUDIO
- how to play a sounds in c# forms?
- Winsound not working isn't working at all
- Ringing noise overpowering voice / Recording audio with Max 9814 microphone on Raspberry pi pico using ADC Pin / Circuitpython
- How to take first x seconds of Audio from a wav file read from AWS S3 as binary stream using Python?
- gluon attach audio doesn't play any sound on android
- Implementing trim and fade filters with ffmpeg - MP3
- Unable to set device connection state as INPUT device type is none
- Is there a way to differentiate music and talking from a video?
- How to concatenate audio tracks and make them start a certain moment using Python?
- Combine two audio in different languages to one natural sounding
- STM32 - Serial Audio Interface (SAI) - dual data line transmit possible?
- playing mp3 downloaded via curllib gets cut short
- How to stream PCM audio to a speakers both on mac and linux in Node.js?
- Scikit-Maad -From the function rois.find_rois_cwt, I want to get a csv of the outputs so I can do my own analysis on it
- Using MediaPlayer slows down SoundPool sound effect
Related Questions in LIVE-STREAMING
- Streamingplatform with Unity, Nodejs and Nextjs
- Janus WEBRTC issue on media stream conection stability
- Android - RTSP Streaming from Camera and view from remote location
- Sometimes when video is encoded using the Video Toolbox Encoder for web live streaming, the decoder output always has a 4 frame latency
- Live video using Youtube Live Streaming Api [Python]
- Check if Status changed from offline to live problems
- HLS (HTTP Live Streaming), m3u8 Url 403 issue, works on extension but not when running locally
- Automating Copyrighted Music Silencing in YouTube Videos Using the YouTube API
- aws ivs live stream does not work on ios devices (Web)
- Why FPS (frames per second) dropped after I added a 30ms delay between frames sending to client using RTC in python?
- FFMPEG and Newtek NDI
- Read RTMP stream in flutter
- Mediasoup recording with Gstreamer has error
- does vimeo api support live streaming from camera?
- How to stream byte array data into androidx.media3.exoplayer?
Related Questions in AUDIO-PLAYER
- discord music bot is connecting and accepting the url but its giving me no audio
- How do I get different song from windows-file-explorer to my existing playlist?
- How to implement pause/resume feature for wav audio with sounddevice in python
- how can I play audio files in dart only without flutter?
- Javascript Array of audio objects doesnt load the tracks
- Flutter : Just Audio "No Network Security Config specified, using platform default"
- Get Stream Title from API
- Errosr while running a PySide6 online audio player
- Updating the UI as soon as audio is played completely
- Audio data (getting in AvAudioEngine) plays sizzling audio in SwiftUi
- (gtkmm, sfml) My music stream is experiencing stuttering
- How to make a Slider Control and progress Bar for Music Player WPF
- MP3 is playing only one time after countdown ends
- Make seekbar function and play mp3 file in java
- mciSendString() doesn't play audio files that have cover art
Related Questions in CSCORE
- CSCore & Unity: How to input Microphone Data (Sample Source) into Audio Source in Unity
- Peak generations for WaveSurfer.js using CSCore
- Why is the last byte of a WasapiLoopbackCapture sample always 3B,3C,3D,3E,BC,BC or BE
- How do I capture the audio of a wpf window or cscore output in c#?
- CSCore with audio through a GoXLR
- Decrease or compress audio quality in CSCORE
- CSCore: NullReferenceException at StopNative() while stopping the playback
- C# CSCore. Can't write pcm-wav from microphone correctly
- How replay score to 0 using unity?
- create wavefile in physical filestream works, create in memorystream fails, waveheader corrupt
- Cannot build CSCORE in VS2019 - ilasm failure in post build
- Change volume of specific app with CSCore
- Cannot compile CSCORE after retargeting to .NET 4.7.2
- C# - Live Streaming Audio over Socket Connection
- Reduce WAV file size using cscore library
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?
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)
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