Search Results

Search found 5304 results on 213 pages for 'audio streaming'.

Page 29/213 | < Previous Page | 25 26 27 28 29 30 31 32 33 34 35 36  | Next Page >

  • How to play simultaneous multiply audio sources in Silverlight

    - by Shurup
    I want to play simultaneous multiply audio sources in Silverlight. So I've created a prototype in Silverlight 4 that should play a two mp3 files containing the same ticks sound with an intervall 1 second. So these files must be sounded as one sound if they will be played together with any whole second offsets (0 and 1, 0 and 2, 1 and 1 seconds, etc.) I my prototype I use two MediaElement (me and me2) objects. DateTime startTime; private void Play_Clicked(object sender, RoutedEventArgs e) { me.SetSource(new FileStream(file1), FileMode.Open))); me2.SetSource(new FileStream(file2), FileMode.Open))); var timer = new DispatcherTimer { Interval = TimeSpan.FromMilliseconds(1) }; timer.Tick += RefreshData; timer.Start(); } First file should be played at 00:00 sec. and the second in 00:02 second. void RefreshData(object sender, EventArgs e) { if(me.CurrentState != MediaElementState.Playing) { startTime = DateTime.Now; me.Play(); return; } var elapsed = DateTime.Now - startTime; if(me2.CurrentState != MediaElementState.Playing && elapsed >= TimeSpan.FromSeconds(2)) { me2.Play(); ((DispatcherTimer)sender).Stop(); } } The tracks played every time different and not simultaneous as they should (as one sound).

    Read the article

  • Procesing 16bit sample audio

    - by user2431088
    Right now i have an audio file (2 Channels, 44.1kHz Sample Rate, 16bit Sample size, WAV) I would like to pass it into this method but i am not sure of any way to convert the WAV file to a byte array. /// <summary> /// Process 16 bit sample /// </summary> /// <param name="wave"></param> public void Process(ref byte[] wave) { _waveLeft = new double[wave.Length / 4]; _waveRight = new double[wave.Length / 4]; if (_isTest == false) { // Split out channels from sample int h = 0; for (int i = 0; i < wave.Length; i += 4) { _waveLeft[h] = (double)BitConverter.ToInt16(wave, i); _waveRight[h] = (double)BitConverter.ToInt16(wave, i + 2); h++; } } else { // Generate artificial sample for testing _signalGenerator = new SignalGenerator(); _signalGenerator.SetWaveform("Sine"); _signalGenerator.SetSamplingRate(44100); _signalGenerator.SetSamples(16384); _signalGenerator.SetFrequency(5000); _signalGenerator.SetAmplitude(32768); _waveLeft = _signalGenerator.GenerateSignal(); _waveRight = _signalGenerator.GenerateSignal(); } // Generate frequency domain data in decibels _fftLeft = FourierTransform.FFTDb(ref _waveLeft); _fftRight = FourierTransform.FFTDb(ref _waveRight); }

    Read the article

  • AS3 microphone recording/saving works, in-flash PCM playback double speed

    - by Lowgain
    I have a working mic recording script in AS3 which I have been able to successfully use to save .wav files to a server through AMF. These files playback fine in any audio player with no weird effects. For reference, here is what I am doing to capture the mic's ByteArray: (within a class called AudioRecorder) public function startRecording():void { _rawData = new ByteArray(); _microphone.addEventListener(SampleDataEvent.SAMPLE_DATA, _samplesCaptured, false, 0, true); } private function _samplesCaptured(e:SampleDataEvent):void { _rawData.writeBytes(e.data); } This works with no problems. After the recording is complete I can take the _rawData variable and run it through a WavWriter class, etc. However, if I run this same ByteArray as a sound using the following code which I adapted from the adobe cookbook: (within a class called WavPlayer) public function playSound(data:ByteArray):void { _wavData = data; _wavData.position = 0; _sound.addEventListener(SampleDataEvent.SAMPLE_DATA, _playSoundHandler); _channel = _sound.play(); _channel.addEventListener(Event.SOUND_COMPLETE, _onPlaybackComplete, false, 0, true); } private function _playSoundHandler(e:SampleDataEvent):void { if(_wavData.bytesAvailable <= 0) return; for(var i:int = 0; i < 8192; i++) { var sample:Number = 0; if(_wavData.bytesAvailable > 0) sample = _wavData.readFloat(); e.data.writeFloat(sample); } } The audio file plays at double speed! I checked recording bitrates and such and am pretty sure those are all correct, and I tried changing the buffer size and whatever other numbers I could think of. Could it be a mono vs stereo thing? Hope I was clear enough here, thanks!

    Read the article

  • Where is /dev/dsp or /dev/audio?

    - by YumYumYum
    I have to apply sudo chmod a+r /dev/dsp or /dev/audio but in my Ubuntu 12.10 i do not have such. Where is then the PCM sound file for ssh? chmod: cannot access `/dev/dsp': No such file or directory chmod: cannot access `/dev/audio': No such file or directory Follow up: http://superuser.com/questions/244173/missing-dev-dsp-under-ubuntu I want to stream the sound output and input. So that i can capture any audio in/out to a file for recording.

    Read the article

  • AAC.js : le décodeur audio JavaScript open source supporte le profile Low Complexity

    AAC.js : le dernier décodeur audio JavaScript de Official.fm Labs qui supporte le profile Low Complexity [IMG]http://media.tumblr.com/tumblr_m6wpozHbxB1qbis4g.png[/IMG] L'équipe de Official.fm Labs vient de sortir un codec audio qui pourrait d'ailleurs être le prochain codec le plus utilisé après le MP3, voire le surpasser. AAC.js est entièrement codé en JavaScript avec le framework Aurora.js qui facilite l'écriture de codecs. AAC, qui signifie Advanced Audio Codec, est l'un des codecs les plus courants et des noms comm...

    Read the article

  • Amnesia doesn't start due to audio problems

    - by james
    I have a problem with amnesia game. After Intro and clicking continue button few times, when game is supposed to start it crashes. Here is console output: ALSA lib pcm_dmix.c:1018:(snd_pcm_dmix_open) unable to open slave ALSA lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.rear ALSA lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.center_lfe ALSA lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.side ALSA lib audio/pcm_bluetooth.c:1614:(audioservice_expect) BT_GET_CAPABILITIES failed : Input/output error(5) ALSA lib audio/pcm_bluetooth.c:1614:(audioservice_expect) BT_GET_CAPABILITIES failed : Input/output error(5) ALSA lib audio/pcm_bluetooth.c:1614:(audioservice_expect) BT_GET_CAPABILITIES failed : Input/output error(5) ALSA lib audio/pcm_bluetooth.c:1614:(audioservice_expect) BT_GET_CAPABILITIES failed : Input/output error(5) ALSA lib pcm_dmix.c:957:(snd_pcm_dmix_open) The dmix plugin supports only playback stream ALSA lib pcm_dmix.c:1018:(snd_pcm_dmix_open) unable to open slave Cannot connect to server socket err = No such file or directory Cannot connect to server socket jack server is not running or cannot be started I should mention I have integrated both graphic and sound card.

    Read the article

  • asus n550jv audio problem: no sound from notebook' speakers

    - by skywalker
    Ubuntu 13.10. The problem is: the internal speakers don't work. I have no problem when I'm using the headphones. There is no hardware issue since in windows 8 everything works perfectly(external subwoofer included). I'm trying to modify /etc/modprobe.d/alsa-base.conf but I can't find the correct model to put into: options snd-hda-intel model= The file HD-Audio-Models.txt doesn't contain the model for ALC668. Some info: :~sudo aplay -l **** List of PLAYBACK Hardware Devices **** card 0: MID [HDA Intel MID], device 3: HDMI 0 [HDMI 0] Subdevices: 1/1 Subdevice #0: subdevice #0 card 0: MID [HDA Intel MID], device 7: HDMI 1 [HDMI 1] Subdevices: 1/1 Subdevice #0: subdevice #0 card 0: MID [HDA Intel MID], device 8: HDMI 2 [HDMI 2] Subdevices: 1/1 Subdevice #0: subdevice #0 card 1: PCH [HDA Intel PCH], device 0: ALC668 Analog [ALC668 Analog] Subdevices: 0/1 Subdevice #0: subdevice #0 :~$ sudo lspci -v | grep -A7 -i "audio" 00:03.0 Audio device: Intel Corporation Xeon E3-1200 v3/4th Gen Core Processor HD Audio Controller (rev 06) Subsystem: Intel Corporation Device 2010 Flags: bus master, fast devsel, latency 0, IRQ 52 Memory at f7a14000 (64-bit, non-prefetchable) [size=16K] Capabilities: [50] Power Management version 2 Capabilities: [60] MSI: Enable+ Count=1/1 Maskable- 64bit- Capabilities: [70] Express Root Complex Integrated Endpoint, MSI 00 Kernel driver in use: snd_hda_intel -- 00:1b.0 Audio device: Intel Corporation 8 Series/C220 Series Chipset High Definition Audio Controller (rev 04) Subsystem: ASUSTeK Computer Inc. Device 11cd Flags: bus master, fast devsel, latency 0, IRQ 53 Memory at f7a10000 (64-bit, non-prefetchable) [size=16K] Capabilities: [50] Power Management version 2 Capabilities: [60] MSI: Enable+ Count=1/1 Maskable- 64bit+ Capabilities: [70] Express Root Complex Integrated Endpoint, MSI 00 Capabilities: [100] Virtual Channel PS info :~$ amixer -c 0 Simple mixer control 'IEC958',0 Capabilities: pswitch pswitch-joined Playback channels: Mono Mono: Playback [on] Simple mixer control 'IEC958',1 Capabilities: pswitch pswitch-joined Playback channels: Mono Mono: Playback [on] Simple mixer control 'IEC958',2 Capabilities: pswitch pswitch-joined Playback channels: Mono Mono: Playback [on] :~$ pacmd dump-volumes Welcome to PulseAudio! Use "help" for usage information. Sink 0: reference = 0: 76% 1: 76%, real = 0: 76% 1: 76%, soft = 0: 100% 1: 100%, current_hw = 0: 76% 1: 76%, save = yes Input 8: volume = 0: 100% 1: 100%, reference_ratio = 0: 100% 1: 100%, real_ratio = 0: 100% 1: 100%, soft = 0: 100% 1: 100%, volume_factor = 0: 100% 1: 100%, volume_factor_sink = 0: 100% 1: 100%, save = no Source 0: reference = 0: 100% 1: 100%, real = 0: 100% 1: 100%, soft = 0: 100% 1: 100%, current_hw = 0: 100% 1: 100%, save = no Source 1: reference = 0: 16% 1: 16%, real = 0: 16% 1: 16%, soft = 0: 100% 1: 100%, current_hw = 0: 16% 1: 16%, save = yes

    Read the article

  • Google I/O 2010 - Advanced Android audio techniques

    Google I/O 2010 - Advanced Android audio techniques Google I/O 2010 - Advanced Android audio techniques Android 301 Dave Sparks In this session, we will explore advanced techniques that you can employ in your apps when working with media. This includes using Android's low-level audio APIs, selecting the appropriate format for your media files, and what's now possible using new media framework APIs introduced in Android 2.2. For all I/O 2010 sessions, please go to code.google.com From: GoogleDevelopers Views: 3 0 ratings Time: 57:16 More in Science & Technology

    Read the article

  • Shortcut to switch between Analog Stereo output & HDMI audio output

    - by iJeeves
    To switch to HDMI audio output (of monitor) and back to normal audio output from system audio jack (for headphones, as my monitor doesn't have audio out), I find myself opening up sound preferences and selecting the right channel everytime. Is there any way I can create a toggle button in the panel or assign some shortcut key to toggle since I do the switching so often. :aplay -l **** List of PLAYBACK Hardware Devices **** card 0: Intel [HDA Intel], device 0: STAC92xx Analog [STAC92xx Analog] Subdevices: 1/1 Subdevice #0: subdevice #0 card 0: Intel [HDA Intel], device 3: HDMI 0 [HDMI 0] Subdevices: 0/1 Subdevice #0: subdevice #0 card 0: Intel [HDA Intel], device 7: STAC92xx Digital [STAC92xx Digital] Subdevices: 1/1 Subdevice #0: subdevice #0

    Read the article

  • SAPPHIRE HD 7770 no audio on HDMI TV display

    - by zeroconf
    I have SAPPHIRE HD 7770 and cannot get work audio over HDMI. http://www.sapphiretech.com/presentation/product/?cid=1&gid=3&sgid=1159&lid=1&pid=1452&leg=0 I use Ubuntu 12.04 LTS 64-bit version with all current updates. I tried at /etc/default/grub: GRUB_CMDLINE_LINUX_DEFAULT="quiet splash radeon.audio=1" ... it didn't help. It's probably I use proprietary driver -this seems to be open source driver. I use the driver, what jockey-gtk (additional drivers) offered me: ATI/AMD PROPRIETARY FGLRX GRAPHICS DRIVER <---- I installed that one ATI/AMD PROPRIETARY FGLRX GRAPHICS DRIVER (post-release update) So - I installed the first one, because installing second version failed. Everything went fine but no sound at TV display by HDMI. Even Gnome sound mixer doesn't show HDMI choice. Using 32" Samsung B530 LCD TV - http://www.lcdbesttv.com/2010/02/samsung-b530-series-lcd-tv/ I have Asus P8Z77-M motherboard - http://www.asus.com/Motherboards/Intel_Socket_1155/P8Z77M/ - there is also HDMI integrated. When I put HDMI cord to that plug, then even Gnome sound mixer showed HDMI audio but it didn't work. I have set from BIOS, that I use that SAPPHIRE HD 7770 from PCIe. My lspci output: 00:00.0 Host bridge: Intel Corporation Ivy Bridge DRAM Controller (rev 09) 00:01.0 PCI bridge: Intel Corporation Ivy Bridge PCI Express Root Port (rev 09) 00:02.0 Display controller: Intel Corporation Ivy Bridge Graphics Controller (rev 09) 00:14.0 USB controller: Intel Corporation Panther Point USB xHCI Host Controller (rev 04) 00:16.0 Communication controller: Intel Corporation Panther Point MEI Controller #1 (rev 04) 00:1a.0 USB controller: Intel Corporation Panther Point USB Enhanced Host Controller #2 (rev 04) 00:1b.0 Audio device: Intel Corporation Panther Point High Definition Audio Controller (rev 04) 00:1c.0 PCI bridge: Intel Corporation Panther Point PCI Express Root Port 1 (rev c4) 00:1c.5 PCI bridge: Intel Corporation Panther Point PCI Express Root Port 6 (rev c4) 00:1c.6 PCI bridge: Intel Corporation 82801 PCI Bridge (rev c4) 00:1d.0 USB controller: Intel Corporation Panther Point USB Enhanced Host Controller #1 (rev 04) 00:1f.0 ISA bridge: Intel Corporation Panther Point LPC Controller (rev 04) 00:1f.2 SATA controller: Intel Corporation Panther Point 6 port SATA Controller [AHCI mode] (rev 04) 00:1f.3 SMBus: Intel Corporation Panther Point SMBus Controller (rev 04) 01:00.0 VGA compatible controller: Advanced Micro Devices [AMD] nee ATI Device 683d 01:00.1 Audio device: Advanced Micro Devices [AMD] nee ATI Device aab0 03:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168B PCI Express Gigabit Ethernet controller (rev 09) 04:00.0 PCI bridge: ASMedia Technology Inc. ASM1083/1085 PCIe to PCI Bridge (rev 03)

    Read the article

  • Unable to configure/setup 5.1 audio with 12.04

    - by Vipin Vinayan
    I am kinda new to Ubuntu as well. I have been having this issue with audio for quite sometime now. Initially, when I installed version 11.10 (I guess), I was able to use my 5.1 speakers without any issues. If my memory serves me right, it was after an update that the 5.1 audio stopped working and the video resolution would not get saved. I temporarily fixed the resolution issue by creating a start-up shell script that would update the resolution and load it. But the issue with audio has been going on for quite sometime now. Even though I have option for 5.1, only two speakers seem to be working. I thought an upgrade should fix the issue and so upgraded the OS to version 12.04. I also tried uninstalling alsa and pulse audio, reinstalling them, changing the /etc/pulse/daemon.conf channels from 2 to 6. I have also tried installing pavucontrol but nothing seems to have worked and the issue still persists. Is there anything else you could suggest? The lspci log on my computer is as follows 00:00.0 Host bridge: Intel Corporation 82G33/G31/P35/P31 Express DRAM Controller (rev 10) 00:01.0 PCI bridge: Intel Corporation 82G33/G31/P35/P31 Express PCI Express Root Port (rev 10) 00:02.0 VGA compatible controller: Intel Corporation 82G33/G31 Express Integrated Graphics Controller (rev 10) 00:1b.0 Audio device: Intel Corporation N10/ICH 7 Family High Definition Audio Controller (rev 01) 00:1c.0 PCI bridge: Intel Corporation N10/ICH 7 Family PCI Express Port 1 (rev 01) 00:1c.1 PCI bridge: Intel Corporation N10/ICH 7 Family PCI Express Port 2 (rev 01) 00:1d.0 USB controller: Intel Corporation N10/ICH 7 Family USB UHCI Controller #1 (rev 01) 00:1d.1 USB controller: Intel Corporation N10/ICH 7 Family USB UHCI Controller #2 (rev 01) 00:1d.2 USB controller: Intel Corporation N10/ICH 7 Family USB UHCI Controller #3 (rev 01) 00:1d.3 USB controller: Intel Corporation N10/ICH 7 Family USB UHCI Controller #4 (rev 01) 00:1d.7 USB controller: Intel Corporation N10/ICH 7 Family USB2 EHCI Controller (rev 01) 00:1e.0 PCI bridge: Intel Corporation 82801 PCI Bridge (rev e1) 00:1f.0 ISA bridge: Intel Corporation 82801GB/GR (ICH7 Family) LPC Interface Bridge (rev 01) 00:1f.1 IDE interface: Intel Corporation 82801G (ICH7 Family) IDE Controller (rev 01) 00:1f.2 IDE interface: Intel Corporation N10/ICH7 Family SATA Controller [IDE mode] (rev 01) 00:1f.3 SMBus: Intel Corporation N10/ICH 7 Family SMBus Controller (rev 01) 03:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168B PCI Express Gigabit Ethernet controller (rev 01) Would really appreciate a response that will assist me in resolving my issue. Thanks in advance Vipin

    Read the article

  • Distorted choppy audio in Precise

    - by Misery
    After installing Precise on my PC, some problems with soud occure. While using Lucid there were no problems. The sound is choppy and distorted in low tones range. As I absolutely have no experience in setting/testing and doing anything with Audo Devices I need help even to diagnose the problem. update: sudo lshw -c multimedia *-multimedia description: Audio device product: Radeon X1200 Series Audio Controller vendor: Hynix Semiconductor (Hyundai Electronics) physical id: 5.2 bus info: pci@0000:01:05.2 version: 00 width: 64 bits clock: 33MHz capabilities: pm msi bus_master cap_list configuration: driver=snd_hda_intel latency=32 resources: irq:19 memory:fdafc000-fdafffff *-multimedia description: Audio device product: SBx00 Azalia (Intel HDA) vendor: Hynix Semiconductor (Hyundai Electronics) physical id: 14.2 bus info: pci@0000:00:14.2 version: 00 width: 64 bits clock: 33MHz capabilities: pm bus_master cap_list configuration: driver=snd_hda_intel latency=32 resources: irq:16 memory:fe024000-fe027fff update 2: It has something to do with the volume. If the audio is quiet it is not choppy, if the sound is loud then it begins to be choppy. Regards, Misery

    Read the article

  • Audio not working in 12.10

    - by frampy
    I did a clean install of 12.10, when I open Sound Settings in gnome the only device in the list is "Dummy Output", and sound is not working. Sound worked fine out of the box in 12.04 I ran alsamixer, it says my card is "HDA Intel", and chip is "Realtek ALC880". The alsamixer playback output was set to mute at first, unmuting did not fix. I checked out the info at http://www.unixmen.com/2012003-howto-resolve-nosound-problem-on-ubuntu/ as suggested on a similar question, I've done everything there except installing the ubuntu audio dev team driver. Should I try install this? Edit: I've been reading the sound troubleshooting guide at https://help.ubuntu.com/community/SoundTroubleshooting It looks like Ubuntu is finding my audio device correctly. mike@wucade:~$ lspci -v | grep -A7 -i "audio" 00:1b.0 Audio device: Intel Corporation 82801FB/FBM/FR/FW/FRW (ICH6 Family) High Definition Audio Controller (rev 03) Subsystem: Albatron Corp. Device 2668 Flags: bus master, fast devsel, latency 0, IRQ 40 Memory at d01c0000 (64-bit, non-prefetchable) [size=16K] Capabilities: Kernel driver in use: snd_hda_intel Kernel modules: snd-hda-intel Still stuck as to why this isn't working.

    Read the article

  • Audio tag doesn't work in FF-Ubuntu 12.04

    - by Nyx
    Does anyone know why this code... <audio width="0" height="0" autoplay="autoplay" loop="loop" preload="none"> <source src="images/musica/Intro.ogg" type="audio/ogg" /> <source src="images/musica/Intro.mp3" type="audio/mpeg" /> </audio> ...works fine in FF17-WinXP and not in FF17-Ubuntu 12.04? I think something is wrong with MIME types but everything looks normal. After searching on the web for days I couldn't find a good answer. Thanks

    Read the article

  • How to play multiple audio sources simultaneously in Silverlight

    - by Shurup
    I want to play simultaneous multiply audio sources in Silverlight. So I've created a prototype in Silverlight 4 that should play a two mp3 files containing the same ticks sound with an intervall 1 second. So these files must be sounded as one sound if they will be played together with any whole second offsets (0 and 1, 0 and 2, 1 and 1 seconds, etc.) I my prototype I use two MediaElement (me and me2) objects. DateTime startTime; private void Play_Clicked(object sender, RoutedEventArgs e) { me.SetSource(new FileStream(file1), FileMode.Open))); me2.SetSource(new FileStream(file2), FileMode.Open))); var timer = new DispatcherTimer { Interval = TimeSpan.FromMilliseconds(1) }; timer.Tick += RefreshData; timer.Start(); } First file should be played at 00:00 sec. and the second in 00:02 second. void RefreshData(object sender, EventArgs e) { if(me.CurrentState != MediaElementState.Playing) { startTime = DateTime.Now; me.Play(); return; } var elapsed = DateTime.Now - startTime; if(me2.CurrentState != MediaElementState.Playing && elapsed >= TimeSpan.FromSeconds(2)) { me2.Play(); ((DispatcherTimer)sender).Stop(); } } The tracks played every time different and not simultaneous as they should (as one sound). Addition: I've tested a code from the Bobby's answer. private void Play_Clicked(object sender, RoutedEventArgs e) { me.SetSource(new FileStream(file1), FileMode.Open))); me2.SetSource(new FileStream(file2), FileMode.Open))); // This code plays well enough. // me.Play(); // me2.Play(); // But adding the 2 second offset using the timer, // they play no simultaneous. var timer = new DispatcherTimer { Interval = TimeSpan.FromSeconds(2) }; timer.Tick += (source, arg) => { me2.Play(); ((DispatcherTimer)source).Stop(); }; timer.Start(); } Is it possible to play them together using only one MediaElement or any implementation of MediaStreamSource that can play multiply sources?

    Read the article

  • WCF Stream.Read always returns 0 in client

    - by G_M
    I've spent most of my day trying to figure out why this isn't working. I have a WCF service that streams an object to the client. The client is then supposed to write the file to its disk. But when I call stream.Read(buffer, 0, bufferLength) it always returns 0. Here's my code: namespace StreamServiceNS { [ServiceContract] public interface IStreamService { [OperationContract] Stream downloadStreamFile(); } } class StreamService : IStreamService { public Stream downloadStreamFile() { ISSSteamFile sFile = getStreamFile(); BinaryFormatter bf = new BinaryFormatter(); MemoryStream stream = new MemoryStream(); bf.Serialize(stream, sFile); return stream; } } Service config file: <system.serviceModel> <services> <service name="StreamServiceNS.StreamService"> <endpoint address="stream" binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_IStreamService" name="BasicHttpEndpoint_IStreamService" contract="SWUpdaterService.ISWUService" /> </service> </services> <bindings> <basicHttpBinding> <binding name="BasicHttpBinding_IStreamService" transferMode="StreamedResponse" maxReceivedMessageSize="209715200"></binding> </basicHttpBinding> </bindings> <behaviors> <serviceBehaviors> <behavior> <serviceThrottling maxConcurrentCalls ="100" maxConcurrentSessions="400"/> <serviceMetadata httpGetEnabled="true"/> <serviceDebug includeExceptionDetailInFaults="false"/> </behavior> </serviceBehaviors> </behaviors> <serviceHostingEnvironment multipleSiteBindingsEnabled="true" /> </system.serviceModel> Client: TestApp.StreamServiceRef.StreamServiceClient client = new StreamServiceRef.StreamServiceClient(); try { Stream stream = client.downloadStreamFile(); int bufferLength = 8 * 1024; byte[] buffer = new byte[bufferLength]; FileStream fs = new FileStream(@"C:\test\testFile.exe", FileMode.Create, FileAccess.Write); int bytesRead; while ((bytesRead = stream.Read(buffer, 0, bufferLength)) > 0) { fs.Write(buffer, 0, bytesRead); } stream.Close(); fs.Close(); } catch (Exception e) { Console.WriteLine("Error: " + e.Message); } Client app.config: <system.serviceModel> <bindings> <basicHttpBinding> <binding name="BasicHttpEndpoint_IStreamService" maxReceivedMessageSize="209715200" transferMode="StreamedResponse"> </binding> </basicHttpBinding> </bindings> <client> <endpoint address="http://[server]/StreamServices/streamservice.svc/stream" binding="basicHttpBinding" bindingConfiguration="BasicHttpEndpoint_IStreamService" contract="StreamServiceRef.IStreamService" name="BasicHttpEndpoint_IStreamService" /> </client> </system.serviceModel> (some code clipped for brevity) I've read everything I can find on making WCF streaming services, and my code looks no different than theirs. I can replace the streaming with buffering and send an object that way fine, but when I try to stream, the client always sees the stream as "empty". The testFile.exe gets created, but its size is 0KB. What am I missing?

    Read the article

  • HTML5 media loading sometimes suspends or aborts: misconfigured Apache?

    - by Joan Botella
    Recently, some code that has been working fine for months started to run unexpectedly. That code is just a media files loading JavaScript function, that uses jQuery. It's pretty long, but in essence it is like this: var $audio=$('<audio>'); $audio.on('canplaythrough',function(e){ $audio[0].play(); }); $audio.attr('src','song.ogg'); Basically, the file only loads sometimes, and sometimes stops loading with a suspend or even an abort event. I have uploaded a little testing HTML to http://www.joanbotella.com/tests/loading , where you can see what's happening. You can download the test files from http://www.joanbotella.com/tests/loading/loadingTest.zip for local testing. I have just checked that opening the test index.html file directly into Firefox, and not through my localhost Apache server, makes the audio files perfectly playable. So, I assume, my hosting and I have the Apache server misconfigured for serving media files. My software versions are: Apache 2.2.22-1ubuntu1.7 , Mozilla Firefox 31.0 , Chromium 36.0.1985.125 and jQuery 1.11.0. Can you help me? Thanks in advance!

    Read the article

  • Help with dynamic range compression function (audio)

    - by MusiGenesis
    I am writing a C# function for doing dynamic range compression (an audio effect that basically squashes transient peaks and amplifies everything else to produce an overall louder sound). I have written a function that does this (I think): public static void Compress(ref short[] input, double thresholdDb, double ratio) { double maxDb = thresholdDb - (thresholdDb / ratio); double maxGain = Math.Pow(10, -maxDb / 20.0); for (int i = 0; i < input.Length; i += 2) { // convert sample values to ABS gain and store original signs int signL = input[i] < 0 ? -1 : 1; double valL = (double)input[i] / 32768.0; if (valL < 0.0) { valL = -valL; } int signR = input[i + 1] < 0 ? -1 : 1; double valR = (double)input[i + 1] / 32768.0; if (valR < 0.0) { valR = -valR; } // calculate mono value and compress double val = (valL + valR) * 0.5; double posDb = -Math.Log10(val) * 20.0; if (posDb < thresholdDb) { posDb = thresholdDb - ((thresholdDb - posDb) / ratio); } // measure L and R sample values relative to mono value double multL = valL / val; double multR = valR / val; // convert compressed db value to gain and amplify val = Math.Pow(10, -posDb / 20.0); val = val / maxGain; // re-calculate L and R gain values relative to compressed/amplified // mono value valL = val * multL; valR = val * multR; double lim = 1.5; // determined by experimentation, with the goal // being that the lines below should never (or rarely) be hit if (valL > lim) { valL = lim; } if (valR > lim) { valR = lim; } double maxval = 32000.0 / lim; // convert gain values back to sample values input[i] = (short)(valL * maxval); input[i] *= (short)signL; input[i + 1] = (short)(valR * maxval); input[i + 1] *= (short)signR; } } and I am calling it with threshold values between 10.0 db and 30.0 db and ratios between 1.5 and 4.0. This function definitely produces a louder overall sound, but with an unacceptable level of distortion, even at low threshold values and low ratios. Can anybody see anything wrong with this function? Am I handling the stereo aspect correctly (the function assumes stereo input)? As I (dimly) understand things, I don't want to compress the two channels separately, so my code is attempting to compress a "virtual" mono sample value and then apply the same degree of compression to the L and R sample value separately. Not sure I'm doing it right, however. I think part of the problem may the "hard knee" of my function, which kicks in the compression abruptly when the threshold is crossed. I think I may need to use a "soft knee" like this: Can anybody suggest a modification to my function to produce the soft knee curve?

    Read the article

  • Can you recommend an effective and cheap CDN for video streaming?

    - by Shaul Dar
    I am looking for a streaming CDN recommendation. Cost and performance are my chief concerns. Video viewers may be all over the globe, with the, US, Europe, Russia and South America topping the list (yes, I know that leaves out a little :-). I saw the following list of streaming CDNs in LinkedIn: Akamai, BitGravity, EdgeCast, Highwinds, Internap, Level3, Limelight, Mirror Image, Move Networks, Qbrick, SimpleCDN, StreamZilla, Swarmcast (streaming via HTTP), WINK Streaming... (+Amazon's S3 and CloudFront) Can anyone recommend any of these or others? Or a different type of technology (e.g. P2P).

    Read the article

  • Why does 3.5 mm audio out work through headphones but not through external speakers?

    - by Rickster
    I have a computer that has a 3.5 mm audio jack on the front of it. The computer itself has no speakers, so this is the only way to hear sound. If I plug headphones into it, the audio properly plays through the headphones, and if I plug in external speakers it used to play through them as well. Just today I turned on my computer and the audio no longer plays through the speakers, but if I plug in the headphones instead it works. The speakers aren't broken, as both the speakers and headphones work in my iPod and play music. I thought that 3.5 mm jacks could not send data back to the computer, and the computer had no way of differentiating between different devices plugged into the jack. If this is true, how is it that the computer plays audio through the headphones but not through speakers plugged into the same 3.5 mm jack, and both devices are functional? Or is my knowledge on 3.5 mm jacks incorrect? I don't believe drivers are important, as the same driver runs the 3.5 mm jack for all devices, but if necessary I can provide additional information. Any ideas would be appreciated. Thanks!

    Read the article

  • Should I host my site on my own hardware for streaming media site?

    - by Reddy S R
    Hi, We are developing a new movie review site, more or less similar to RottenTomatoes. Now since there will be a lot of streaming of movie trailers and we are expecting medium traffic, do you think 3rd party web hosting will cost a lot? Should we rather go for our own hardware server software? We expect around 10GB of streaming to happen per month from 2 - 6 months of web site launch. Less before and more after that period. What do you suggest? Thanks Sridhar Reddy

    Read the article

  • Media Streaming Server

    - by Ehsan
    I'm looking for a media stream server (specially audio streams) for installing on my Ubuntu server box. Is there any lightweight, easy configurable solution? It's awesome if this solution is able to install on a high bandwidth server and gets a stream from a low bandwidth server and serves it for many clients. (simply because the original server hasn't enough BW to serve media for many clients) (My server is a LAMP server, but I'm looking for a good solution for one of my clients to stream his audio for one hour every week)

    Read the article

< Previous Page | 25 26 27 28 29 30 31 32 33 34 35 36  | Next Page >