Search Results

Search found 5509 results on 221 pages for 'sound effects'.

Page 59/221 | < Previous Page | 55 56 57 58 59 60 61 62 63 64 65 66  | Next Page >

  • C++: Static variable inside a constructor, are there any drawbacks or side effects?

    - by doc
    What I want to do: run some prerequisite code whenever instance of the class is going to be used inside a program. This code will check for requiremts etc. and should be run only once. I found that this can be achieved using another object as static variable inside a constructor. Here's an example for a better picture: class Prerequisites { public: Prerequisites() { std::cout << "checking requirements of C, "; std::cout << "registering C in dictionary, etc." << std::endl; } }; class C { public: C() { static Prerequisites prerequisites; std::cout << "normal initialization of C object" << std::endl; } }; What bothers me is that I haven't seen similar use of static variables so far. Are there any drawbacks or side-effects or am I missing something? Or maybe there is a better solution? Any suggestions are welcome.

    Read the article

  • A simple free MIDI implementation in Java besides javax.sound.midi: Are there any?

    - by Peterdk
    The problem is: Android doesn't implement javax.sound.midi. I need a simple free library that allows me to create simple 1-track midi files. I searched the net for it, but can't really find anything, since everything uses javax.sound.midi . The license needs to be one where I don't need to opensource my linked app. Any ideas? I also looked into the fileformat itself. However, I am totally not familiar with working with bytes, hexidecimal stuff etc. So, other option is: are there any simple midi implementations that I can use as reference?

    Read the article

  • C#: Replicating keyboard shortcuts in textbox, how do I prevent the beep sound caused by alt key pre

    - by Michael Johnson
    I'm creating a routine that allows the user to replicate keyboard shortcuts into a textbox for 'custom keyboard shortcuts' customization, but everytime the alt key is pressed with another letter, it produces another sound. I'm capturing the keys in the textbox_keydown event to parse the modifiers + other keys into a readable Shift + A or Ctrl + Shift + B manner into that very same textbox. Should I be doing this in a different event like textbox_previewkey instead of textbox_keydown? How can I prevent the alt modifier key + a letter or number causing the Beep sound? the textbox is just a normal .net 3.5 textbox with the only edited properties of it being the ReadOnly property to false. Is there a better way I could re-do this? I'm currently just checking that if any modifiers keys are pressed and then + a-z or 0-9, then to go ahead and input the appropriately pressed keys into that same textbox like Shift + A or Ctrl + Shift + Y.

    Read the article

  • How to prevent the beep sound caused by alt key pressed in a WinForms TextBox?

    - by Michael Johnson
    I'm creating a routine that allows the user to replicate keyboard shortcuts into a textbox for 'custom keyboard shortcuts' customization, but every time the alt key is pressed with another letter, it produces another sound. I'm capturing the keys in the textbox_keydown event to parse the modifiers + other keys into a readable Shift + A or Ctrl + Shift + B manner into that very same textbox. Should I be doing this in a different event like textbox_previewkey instead of textbox_keydown? How can I prevent the alt modifier key + a letter or number causing the Beep sound? the textbox is just a normal .net 3.5 textbox with the only edited properties of it being the ReadOnly property to false. Is there a better way I could re-do this? I'm currently just checking that if any modifiers keys are pressed and then + a-z or 0-9, then to go ahead and input the appropriately pressed keys into that same textbox like Shift + A or Ctrl + Shift + Y.

    Read the article

  • What Is Causing The Humming Sound On My Website?

    - by Draven Vestatt
    I've noticed this on a handful of websites on the web. Sometimes there will be a low humming sound, that doesn't increase or decrease with volume. I've searched the web, and I can't find anything addressing it. My website that I've working on(still under construction): http://nottheactualaddress.com Do you hear a low humming sound? The audio is low even if you turn up your volume. If so, what do you think is causing it? It's driving me crazy...

    Read the article

  • Help me convert my gaming headset plugs (mic & stereo sound) to a single 2.5mm monaural plug

    - by Flotsam N. Jetsam
    I have a seldom used piece of computer hardware I'd like to connect a gaming headset to. The headset has two 3.5mm plugs (mic and sound) like this: The jack I need to plug into is a 2.5mm monaural (don't ask me why--I know it sounds goofy but it's for someone else who's very picky). I googled a few different ways but I could only find splitters such as this for going from 2 x 3.5mm to 1 3.5mm. If I could find one that could combine it properly to 1 3.5mm, I could then find a 3.5mm to 2.5mm adapter. I know I could probably vivisect and work something out, but I need it to be very clean. Any ideas?

    Read the article

  • How do I force Windows to play sound through the speakers only when a USB headset isn't connected?

    - by Phoexo
    I'm using a speaker set connected through the green audio jack and a headset which I connect through USB. My problem is that every time I connect/disconnect my headset, I have to go through a lot of settings/restart some programs to make the sound go through the speakers again. What I want is to have audio play through the headset when it's connected, but if I disconnect the headset, I want the audio to automatically play through the speakers. For example, if I connect/disconnect the headset while listening to music, I have to restart the application to make the music play through the correct speaker/headset, and it shouldn't be that inconvenient. (I found this somewhat relevant topic, but the problem is that it doesn't really give an answer. (Also, it is 2 years old.))

    Read the article

  • Play music by Operator in asterisk?

    - by Rev
    Hi I want in call duration between operator and caller,play sound for operator(something like hold music). But in order to play this sound, operator must dial unique code and then sound will be play for caller, and caller only hear that sound file! After that (sound fully played), caller back to operator's queue or something like this. So is this possible to do or not? (if possible, post dial-plan for this too)

    Read the article

  • Play music by Operator in asterisk?

    - by Rev
    Hi I want in call duration between operator and caller,play sound for operator(something like hold music). But in order to play this sound, operator must dial unique code and then sound will be play for caller, and caller only hear that sound file! After that (sound fully played), caller back to operator's queue or something like this. So is this possible to do or not? (if possible, post dial-plan for this too)

    Read the article

  • Examples of interesting implementations of character stats?

    - by Tchalvak
    I've got this BBG going ( http://ninjawars.net ), and the character stats currently are simplistic. I'm looking to add a few stats to the current 1/2 (strength and maximum hitpoints, essentially). I've come up with: (strength (unchanged), speed, stamina, and some others that are somewhat interesting wildcard stats). However, I'm not satisfied with how boring the effects of some of these stats are, because they're very linear. Better stat, better effects of the stat, but the stats don't interact with each-other, there's no Rock-Paper-Scissors interaction, having more is always better all the time. So what I'd really like is to see examples of interesting character stats or effects of stats? Examples that I can think of off hand: Call of Cthulu's Insanity stat (things get really weird/chaotic if you start losing sanity) White Wolf stats, to a certain extent (the stats themselves have some basic effects, and all skills effectiveness base themselves off of stats as well) What are some other ways people have used stats to check out?

    Read the article

  • XNA model drawing problem

    - by user1990950
    When using this code: public static void DrawModel(Model model, Vector3 position, Vector3 offset, float xRotation, float yRotation, float zRotation, float allrot, float xScale, float yScale, float zScale) { position.Y *= -1; offset.Y *= -1; Matrix worldMatrix = ((Matrix.CreateRotationZ(MathHelper.ToRadians(zRotation)) * Matrix.CreateRotationX(MathHelper.ToRadians(xRotation))) * Matrix.CreateRotationY(MathHelper.ToRadians(yRotation))) * (Matrix.CreateTranslation(offset) * Matrix.CreateRotationY(MathHelper.ToRadians(allrot))) * Matrix.CreateScale(xScale, yScale, zScale); worldMatrix *= Matrix.CreateTranslation(position) * theCamera.GetTransformation() * Matrix.CreateTranslation(new Vector3(-(graphics.GraphicsDevice.Viewport.Width / 2), graphics.GraphicsDevice.Viewport.Height / 2, 0)); foreach (ModelMesh mesh in model.Meshes) { for (int i = 0; i < mesh.Effects.Count; i++) { ((BasicEffect)mesh.Effects[i]).EnableDefaultLighting(); ((BasicEffect)mesh.Effects[i]).World = worldMatrix; ((BasicEffect)mesh.Effects[i]).View = viewMatrix; ((BasicEffect)mesh.Effects[i]).Projection = projectionMatrix; } mesh.Draw(); } } The model rotates and then scales. It should scale and then rotate, but whenever I try to change it, it won't work.

    Read the article

  • Problems with 5.1 digital out on Ubuntu 12.04

    - by user895319
    I've recently bought a new PC, installed Ubuntu and am now unable to get 5.1 digital sound working. Simple analogue stereo works fine on both the front and rear connectors. On my old box I connected the coax connection from my soundcard to my surround sound amplifier, set Settings-Sound to "Digital Stereo Duplex" and it worked. My old soundcard doesn't fit in my new machine so I'm using the built-in sound hardware. I'm connecting the combination output socket on the back of the PC via the same cable to my surround amp as before. The MB is an MSI Global H61M-P31 with an RealTek ALC887 sound chip. When I go to Settings-Sound I only see "Headphone Built-in Audio" and "Analogue Output Built-in Audio" - no digitial options. The output from aplay -l is: default Playback/recording through the PulseAudio sound server sysdefault:CARD=PCH HDA Intel PCH, ALC887-VD Analog Default Audio Device front:CARD=PCH,DEV=0 HDA Intel PCH, ALC887-VD Analog Front speakers surround40:CARD=PCH,DEV=0 HDA Intel PCH, ALC887-VD Analog 4.0 Surround output to Front and Rear speakers surround41:CARD=PCH,DEV=0 HDA Intel PCH, ALC887-VD Analog 4.1 Surround output to Front, Rear and Subwoofer speakers surround50:CARD=PCH,DEV=0 HDA Intel PCH, ALC887-VD Analog 5.0 Surround output to Front, Center and Rear speakers surround51:CARD=PCH,DEV=0 HDA Intel PCH, ALC887-VD Analog 5.1 Surround output to Front, Center, Rear and Subwoofer speakers surround71:CARD=PCH,DEV=0 HDA Intel PCH, ALC887-VD Analog 7.1 Surround output to Front, Center, Side, Rear and Woofer speakers dmix:CARD=PCH,DEV=0 HDA Intel PCH, ALC887-VD Analog Direct sample mixing device dsnoop:CARD=PCH,DEV=0 HDA Intel PCH, ALC887-VD Analog Direct sample snooping device hw:CARD=PCH,DEV=0 HDA Intel PCH, ALC887-VD Analog Direct hardware device without any conversions plughw:CARD=PCH,DEV=0 HDA Intel PCH, ALC887-VD Analog Hardware device with all software conversions While googling for ALC887 I've seen some references to "ALC887 -VD Analog" and some to "ALC887 -VD Digital". Does anyone know if I need to force it to chance mode somehow? It's worth mentioning that when I set the output to 5.1 digital surround in Windows 7 on the same machine I still don't get any sound so it's not a unique Linux problem. Thanks for any help.

    Read the article

  • PC monitors shut off and system hangs while playing 3D games, but sound continues - Diagnosis?

    - by Jon Schneider
    Two days ago, I started running into a problem with my Windows PC: The PC's two connected monitors simultaneously lose signal and go black (as though the PC had been powered off). The keyboard's Numlock, Capslock, and Scroll Lights will become "stuck" in their current positions, as though the PC is hung. (For example, the Numlock light on the keyboard remains lit regardless of me pressing the Numlock key repeatedly.) No keyboard input does anything. (Ctrl+Alt+Del, Ctrl+Shift+Esc, Ctrl+C, etc.) However -- Whatever sound/music the PC was playing continues to play, and the PC's fans continue running, so the PC hasn't powered itself off or rebooted itself. Opening up the case, the graphics card is pretty hot to the touch. I had this happen 3 times in one evening. In all cases, I was playing a game with 3D graphics when the problem occurred (Torchlight, Minecraft, Magic: The Gathering 2012, Avadon: The Black Fortress demo). I have yet to have the problem happen when I'm not playing a game. This system has been running stable for about 2.5 years prior to this. I didn't make any changes to the system prior to the problem starting to occur. System specs: OS: Windows 7 64-bit Processor: Intel Core 2 Duo E7200 Wolfdale 2.53GHz Video Card: XFX GeForce 9800 GT 512 MB Motherboard: Foxconn P45A-S LGA 775 Intel ATX RAM: Corsair 4 GB (2x 2GB) DDR2-800 (PC2 6400) Full specs: New PC 2008 Troubleshooting tried so far (the problem occurred again after taking each of these steps, one at a time): Updated the video drivers with the latest drivers from NVidia's site. Opened up the case and cleaned out the video card and processor fans (both were pretty dirty). Installed and ran temperature monitor software. The processor idles at about 50 degrees C, and goes up to about 63 degrees C while playing a game (seems on the warm side, but not excessively so?). The software wasn't able to report the temperature of the GPU -- not sure this particular GPU supports software temperature readout? My initial diagnosis is that maybe the GPU is on its last legs (given that it seems to be running pretty hot, and the problem only occurs while playing 3D games). Does this seem likely? Or is it likely that this problem is caused by the processor, RAM, or motherboard? Or could this be a software issue of some kind? Thanks for any advice!

    Read the article

  • PulpCore OGG music playback - can't loop as soon as I animate the musicVolume property

    - by Peter Perhác
    I have been experimenting with PulpCore for about a week or so and I am enjoying it very much but today I ran into a problem that I can't quite figure out. Sound bgMusic = Sound.load("music/music.ogg"); Playback musicPlayback; ... musicVolume = new Fixed(0.75); musicPlayback = bgMusic.loop(musicVolume); //TODO figure out why it's NOT looping when volume is animated // musicVolume.animate(0, musicVolume.get(), FADE_IN_TIME); This code, for as long as the last line is commented out, plays the music.ogg again and again in an endless loop (which I can stop by calling stop on the Playback object returned from loop(). However, I would like the music to fade in smoothly, so following the advice of the PulpCore API docs, I added the last line which will create the fade-in but the music will only play once and then stop. I wonder why is that? Here is a bit of the documentation: Playback pulpcore.sound.Sound.loop(Fixed level) Loops this sound clip with the specified volume level (0.0 to 1.0). The level may have a property animation attached. Parameters: level Returns: a Playback object for this unique sound playback (one Sound can have many simultaneous Playback objects) or null if the sound could not be played. So what could be the problem? I repeat, with the last line, the sound fades in but doesn't loop, without it it loops but starts with the specified 0.75 volume level.

    Read the article

  • Is there anyway to turn off the url "cliking" sound in IE using html, javascript, or flash?

    - by Anthony
    I have a flash application written in action script 2, and at one point it makes multiple back-to-back JavaScript requests using getUrl(). They have to be done as separate requests because IE had a limit on the length of a single request, and fails silently if that limit is passed. When ever this happens, if the user has their sound turned on there is a barrage of "click click click".

    Read the article

  • How to use sound and images in a Java applet?

    - by Click Upvote
    Question 1: How should I structure my project so the sound and images files can be loaded most easily? Right now, I have the folder: C:\java\pacman with the sub-directory C:\java\pacman\src containing all the code, and C:\java\pacman\assets containing the images and .wav files. Is this the best structure or should I put the assets somewhere else? Question 2: What's the best way to refer to the images/sounds without using the full path e.g C:\java\pacman\assets\something.png to them? If I use the getCodeBase() function it seems to refer to the C:\java\pacman\bin instead of C:\java\pacman\. I want to use such a function/class which would work automatically when i compile the applet in a jar as well as right now when I test the applet through eclipse. Question 3: How should I load the images/sounds? This is what I'm using now: 1) For general images: import java.awt.Image; public Image getImg(String file) { //imgDir in this case is a hardcoded string containing //"C:\\java\\pacman\\assets\\" file=imgDir + file; return new ImageIcon(file).getImage(); } The images returned from this function are used in the drawImage method of the Graphics class in the paint method of the applet. 2) For a buffered image, which is used to get subImages and load sprites from a sprite sheet: public BufferedImage getSheet() throws IOException { return ImageIO.read(new File(img.getPath("pacman-sprites.png"))); } Later: public void loadSprites() { BufferedImage sheet; try { sheet=getSheet(); redGhost.setNormalImg(sheet.getSubimage(0, 60, 20, 20)); redGhost.setUpImg(sheet.getSubimage(0, 60, 20, 20)); redGhost.setDownImg(sheet.getSubimage(30, 60, 20, 20)); redGhost.setLeftImg(sheet.getSubimage(30, 60, 20, 20)); redGhost.setRightImg(sheet.getSubimage(60, 60, 20, 20)); } catch (IOException e) { System.out.println("Couldnt open file!"); System.out.println(e.getLocalizedMessage()); } } 3) For sound files: import sun.audio.*; import java.io.*; public synchronized void play() { try { InputStream in = new FileInputStream(filename); AudioStream as = new AudioStream(in); AudioPlayer.player.start(as); } catch (IOException e) { e.printStackTrace(); } }

    Read the article

  • What effects drawing charts/diagrams from $_SESSION data under php5, which worked under php4?

    - by ste_php
    Hello, I have a script generating 3 diagrams from $_SESSION variables which work fine under php4 with register_globals = off, but when I parse the same script as php5 I get no diagram. The diagrams a drawn from GD libary and it works, if I set the data into an Array (manually filled) within the script file. But I need a way to get it work on php5, without much changes. Are there any SESSION settings or php-settings which might interfere with my script. I already checked a lot of the php-settings (changing php.ini over and over again), but found nothing what brings me the diagrams back. Hopefully someone of you could kick me into the right direction. Any Ideas? Thanks a lot.

    Read the article

  • Java IO (javase 6)- Help me understand the effects of my sample use of Streams and Writers...

    - by Daddy Warbox
    BufferedWriter out = new BufferedWriter( new OutputStreamWriter( new BufferedOutputStream( new FileOutputStream("out.txt") ) ) ); So let me see if I understand this: A byte output stream is opened for file "out.txt". It is then fed to a buffered output stream to make file operations faster. The buffered stream is fed to an output stream writer to bridge from bytes to characters. Finally, this writer is fed to a buffered writer... which adds another layer of buffering? Hmm...

    Read the article

< Previous Page | 55 56 57 58 59 60 61 62 63 64 65 66  | Next Page >