Powder toy should have sound

  • merty009
    31st Mar 2012 Member 3 Permalink
    Hey why cant powder toy have sound the game feels so much better and i would love a sound mod if anyone has on can u please post it on this thread so i and others can download it
  • Xorite
    31st Mar 2012 Member 0 Permalink
    It's possiable. Why did you post this in the Creation Section though? Some one has already thaught of this idea BTW.
  • boxmein
    31st Mar 2012 Former Staff 0 Permalink
    @merty009 (View Post)
    @Xorite (View Post)
    (Superb editing)
    !sound soundfile.wav
    It already has sound.
    Elements making noises, however, would be disastrous to listen to, a nightmare to code and the worst things ever. Like really, if each metal pixel made a electric noise, then filling the screen with metal and placing battery everywhere..

    in console.c lines 209-213:

    else if (strcmp(console2, "sound")==0 && console3[0])
    {
    if (sound_enable) play_sound(console3);
    else strcpy(console_error, "Audio device not available - cannot play sounds");
    }


    Edit to below: By the code, it does have sound playing support. It isn't commented out nor supported in an #ifdef block so it should work.

    In main.c lines 866-878:
    else if (!strncmp(argv[i], "sound", 5))
    {
    /* Open the audio device and start playing sound! */
    if ( SDL_OpenAudio(&fmt, NULL) < 0 )
    {
    fprintf(stderr, "Unable to open audio: %s\n", SDL_GetError());
    }
    else
    {
    sound_enable = 1;
    SDL_PauseAudio(0);
    }
    }


    So maybe run powder toy from a shortcut (or command line) with the option "sound"?


    Conclusion:
    The Powder Toy has sound when you run it from the command line with the option "sound".
    To use sound, you would have to enter !sound file.wav into the console.
    Only WAV works. Confirmed. [Link]
  • Dingolo
    31st Mar 2012 Member 0 Permalink
    @boxmen
    Erm... this command is invalid.
  • Catelite
    31st Mar 2012 Former Staff 0 Permalink
    Pretty sure sound support was added ages ago, just never used for anything.

    Someone will just have to tighten their belt and code it in I guess, at the moment none of the devs can be bothered. XD
  • jenn4
    31st Mar 2012 Member 0 Permalink
    @Catelite (View Post)
    It is coded. Nothing just uses it, so no need to code it in, just code something to use it.
  • devast8a
    31st Mar 2012 Former Staff 0 Permalink
    @jenn4 (View Post)
    That's what she said :V
  • billion57
    1st Apr 2012 Member 0 Permalink
        ?
  • epicksl
    1st Apr 2012 Member 0 Permalink
    My friend srossd tried to code muse which made a pitch when sparked the problem was spark is 4 frames long and made the music glitchy....to glitchy to run
  • jacob1
    1st Apr 2012 Developer 0 Permalink
    If I had a sound file in .wav format with just a simple note, I could probably add a NOTE element into the powdertoy

    @epicksl (View Post)
    You just need to check if the life of the spark is equal to 4, it would have worked that way. How exactly did your friend do it?