Page 3 of 15 FirstFirst 12345678910111213 ... LastLast
Results 21 to 30 of 150

Thread: Llama's and Intuition's Techie Thread

  1. #21
    Low Bitrate
    Join Date
    Mar 2000
    Location
    Northville, MI, USA
    Posts
    65

    Qt 4.1

    QT4.1 (4.01 had some paint engine bugs) was a nice upgrade for me.

    I'm skinning my app, and 4.1 includes Alpha Blending (I'm using PNG images).. and anti aliasing. So far I'm impressed with the results. Fixed the problems I had with 3.3 and widget background origins.

    How much audio does your app do? Mostly playback? Or do you use sound effects for events (button clicks, screen changes, etc)?

    In relation to Xine... is it possible for Xine and your app to both send audio out, or can only 1 app send audio to oss/alsa/etc?

    Thanks,
    -Chris

  2. #22
    Low Bitrate
    Join Date
    Mar 2000
    Location
    Northville, MI, USA
    Posts
    65
    I know this isn't my thread.. but looking at your Silverwold code, I'm very impressed so far. Its actually readable!

    I would be very interested in looking at your fmod code, specially if you write a QObject wrapper with signals and slots around it.

    I also have some questions about your Xine controls... but do you guys want me to start another thread?

    -Chris

    Quote Originally Posted by intuitionsys
    I'll post the code on silverwolf.intuitionsys.com when 1.3 reaches fruition if you're curious. The major changes will be in audio.cpp/h (new wrapper class for fmod) and fft.cpp/h.

  3. #23
    Variable Bitrate intuitionsys's Avatar
    Join Date
    Jul 2005
    Location
    Northern Virginia
    Posts
    293
    Quote Originally Posted by strandtc
    I know this isn't my thread.. but looking at your Silverwold code, I'm very impressed so far. Its actually readable!
    Yeah I'm not a big fan of unintended obfuscated C
    Quote Originally Posted by strandtc
    I would be very interested in looking at your fmod code, specially if you write a QObject wrapper with signals and slots around it.
    Once I've completed the move I'll be posting the code as version 1.3 on my site.
    Quote Originally Posted by strandtc
    I also have some questions about your Xine controls... but do you guys want me to start another thread?
    This thread isn't exclusive to Llama and myself. Llama just wanted to keep this thread technically oriented to real programming and integration issues, so if that's the vein of your query, post on dude...

    As for Xine control, what I'm doing if you haven't gathered from the code already, is simply embedding (or rather "psuedo-embedding" to be accurate) the xine-ui process to draw a borderless window with exact geometry over an existing QDialog (unless you're in full-screen mode). It is controlled via a socket connection to the process, except where there is no remote command and then it just sends an X Event to the Xine window emulating a keypress, e.g. to change the audio latency.

    Now that I've moved to FMOD and ditched aRts, I've got four options; 1) Use something besides Xine that has the same controllability but is either easily truliy embeddable or at least easier to pipe audio to another app, 2) Close the FMOD system library to release the audio device when Xine is playing, 3) Keep using Xine and write a plugin that Xine can use to pipe its audio to Silverwolf so it can be processed by FMOD, or 4) Completely embed Xine into Silverwolf.

    Option 2 is obviously the easiest and that's probably what I'll do for the short term, and it's not that big a sacrifice. Option 4 is obviously the holy grail unless I find something that works better of course.

    Quote Originally Posted by strandtc
    How much audio does your app do? Mostly playback? Or do you use sound effects for events (button clicks, screen changes, etc)?
    It does everything except recording. There are sounds for every button click, every module openning, startup, as well as voice synthesis. The voice synthesis could actually be replaced with static sounds pieced together. Things like "Navigation safety disabled" could simply be a static wav file, and things like "Playlist 46" could be pieced together from "Playlist", "forty" and "six" which would probably sound better anyway with a sexy female voice - although I doubt I'll talk my wife into doing that
    Silverwolf 2 is dead.
    Silverwolf 3...?

  4. #24
    FLAC TheLlama's Avatar
    Join Date
    Jul 2004
    Location
    All over the world
    Posts
    970
    Cool, people are starting to get interested in Linux players. It sounds like we are all sort of doing the same thing with FMOD. You guys are wrapping it a class derived from QObject while I'm encapsulating mine in a class derived from sigc::trackable to provide signals/slots. BTW, I'm using sigc::trackable because I'm not using full-blown GTK or QT and libsigc++ is a separate package.

    On another note, I haven't completed much with my player except CAD'ing a new enclosure. I'm going to have VeritasForge pound one out of stainless steel.

    Also, has anyone tried using SQLite with Apache/PHP5?

  5. #25
    Low Bitrate
    Join Date
    Mar 2000
    Location
    Northville, MI, USA
    Posts
    65
    Another question. I have been messing around with FMOD, just doing some initial testing. I downloaded the library (fmod ex) and compiled the examples.

    playstream plays back an mp3 that comes with the library. It sounds "fast" and has some sort of artifact in it. I wrote my own simple C++ app with the start of a QObject wrapper, and it does the same thing.. on a few different test mp3's I have.

    I'm compairing the playback to xmms, and mplayer.. and there is a HUGE difference in audio quality.

    Did you guys run into this?

    -Chris

  6. #26
    FLAC TheLlama's Avatar
    Join Date
    Jul 2004
    Location
    All over the world
    Posts
    970
    Quote Originally Posted by strandtc
    Did you guys run into this?

    -Chris
    Nope. Have you tried other MP3s?

    Edit: Doh, just re-read the post. I'm not sure what is wrong then. FMOD has excellent sound quality for me.

  7. #27
    Variable Bitrate intuitionsys's Avatar
    Join Date
    Jul 2005
    Location
    Northern Virginia
    Posts
    293
    Me either. FMOD has been a godsend for the most part (except the licensing )

    Are you doing anything funky beyond createStream() or createSound(), i.e. DSP effects, 3D, etc.?

    I'm using FMOD_SOFTWARE in the createStream() call since spectrum data isn't available when using FMOD_HARDWARE. Are you doing the same?
    Silverwolf 2 is dead.
    Silverwolf 3...?

  8. #28
    Low Bitrate
    Join Date
    Mar 2000
    Location
    Northville, MI, USA
    Posts
    65
    I don't think I'm doing anything different. I basically copied the playstream code segments into a QObject structure.

    Thinning down my code for space (removing comments and err checking)

    The Object has a couple variables as members....

    FMOD::System *system;
    FMOD::Sound *sound;
    FMOD::Channel *channel;

    So my constructor has:

    {
    FMOD_RESULT result;

    result = FMOD::System_Create(&system);
    result = system->init(1, FMOD_INIT_NORMAL, 0);
    }


    Play Member Function:

    {
    result = system->createSound("../media/wave.mp3", FMOD_SOFTWARE | FMOD_2D | FMOD_CREATESTREAM, 0, &sound);
    result = system->playSound(FMOD_CHANNEL_FREE, sound, false, &channel);
    }


    Destructor:
    {
    result = sound->release();
    result = system->close();
    result = system->release();
    }



    I also tried "createStream" insted of "createSound" using the default arguments listed in the documentation (FMOD_DEFAULT), with the same results.

    I havn't tried a wav file yet.. thats my next try.

    -Chris

  9. #29
    Variable Bitrate intuitionsys's Avatar
    Join Date
    Jul 2005
    Location
    Northern Virginia
    Posts
    293
    re the spectrum, last night I again tried numerous logarithmic and linear equations to adjust the spectrum to more closely indicate reality and found that something slightly similar to Llama's original method worked best, at least as far as the coordination between my eyes and ears is concerned:

    Logarithmic scaling such as 10 * log10( f ) * 2 result in far too much "averaging" (actually not averaging but it appears as such when the curve is plotted verbatim) where things like drum beats in relative silence are not nearly as pronounced as they should be.

    Pure linear scaling without scaling for max across the spectrum results in inordinately low values across the spectrum. This lines up with what's in the API docs.

    Linear scaling adjusting for max across the spectrum yields a much more visually indicative spectrum but the gain drops sharply from 1/2 nyquist to nyquist, showing a lopsided spectrum favoring the bass frequencies with very little response to obvious high frequency spikes, such as a cymbal crash.

    So what I ended up with was this:

    Sample the spectrum
    Find the L and R max points
    Scale the spectrum according to the max points
    Apply a linear gain, increasing from no gain to max gain across 1/2 nyquist to nyquist

    This yielded (at least for me) a very realistic and responsive spectrum. If anyone is curious I can post the code which lies entirely inside an overridden QObject::timerEvent().
    Silverwolf 2 is dead.
    Silverwolf 3...?

  10. #30
    FLAC TheLlama's Avatar
    Join Date
    Jul 2004
    Location
    All over the world
    Posts
    970
    Quote Originally Posted by intuitionsys
    This yielded (at least for me) a very realistic and responsive spectrum. If anyone is curious I can post the code which lies entirely inside an overridden QObject::timerEvent().
    Cool, I'm glad I could point you in the right direction. Now would be a good time to get that pub-ftp or BB up and post the spectrum and fmod classes. I just regressed my original values to find the equations that I like. To make it so the user can adjust the spectrum settings to their own taste - I think that the best idea is to calculate the look-up arrays at startup. I'm thinking of either having it so the user plugs the values into A * log( f * D ) * B / log(C). That, or have a simple parser that can read in an equation symbolicly.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •