Page 1 of 2 12 LastLast
Results 1 to 10 of 15

Thread: C++ or JAVA for controlling winamp? (long)

  1. #1
    Maximum Bitrate MikeHunt79's Avatar
    Join Date
    Aug 2001
    Location
    Cambridge & Bristol, UK
    Posts
    707

    C++ or JAVA for controlling winamp? (long)

    I am working on a flash based winamp frontend, which is similar to gutter's & magnetik's winamp/flash/vb program ( New MP3 Car Software in VB6 ). The problem is that i don`t have VB, so i have no way of interfacing flash with winamp.

    Here's the dilemma... I need a way to interface flash with winamp, but the only HLL i know is Java. I also have a copy of Visual C++ lying around, but i have absolutely no C++ experience, and i'm sure i could learn it overnight (or could i ).

    I`d like to use C++ because i could bulid the whole thing into one exe, and run it as the shell. It might even run faster as well (i`ll be running a celery 450 in the car). The winamp site has loads of info on using C++ as well as a SDK. I`m just not sure how long it would take though, considering i`ll have to learn C++ as well. Any C++ programmers here have any advice?

    I`d like to use JAVA because i already know it, and i'd have time to implement more features. The winamp site has nothing on using java, but i did manage to find a java plug in though- execpt the authors website
    website has gone down. I found a archived copy though, but only half the documentation was intact. I`ve tried e-mailing plug in author for the documentation, but i think his e-mail address went down with his website.
    Another disadvantage is that i couldn`t run the program as an .exe from the shell, but i`m sure i could find someway of running it on boot up.

    Please help.... Has anyone here already tried using C++ or Java? Any input and information is appeciated, as i havent a clue what to do.

  2. #2
    FLAC
    Join Date
    Apr 2001
    Location
    Here, There, Everywhere
    Posts
    1,436
    Mike,

    first idea, get VB6 and learn it!! If you have a good C++ knowledge then you will have no trubbles picking it up... and makes for some great rapid development.

    maybe speak to Charles a bit more, since his Cobra applications are coded in C/C++ and he is a total fan of the lang!!

    dunno about JAVA, but I would guess that it would be hard to use the winamp API thru the JDK..... I could be wrong, but I think a native win32 lang would make the job alot easier for you... and quicker too. JAVA can be a dog in runtime...
    Project - GAME OVER :(

  3. #3
    Low Bitrate
    Join Date
    May 2002
    Location
    Wisconsin
    Posts
    76
    VB. *grin*

  4. #4
    FLAC Gutter's Avatar
    Join Date
    Dec 1999
    Location
    Casina, Italy
    Posts
    901

    Re: C++ or JAVA for controlling winamp? (long)

    Originally posted by MikeHunt79
    The problem is that i don`t have VB, so i have no way of interfacing flash with winamp.

    This is a misconception which I've heard a few times. Flash shouldn't control anything. It only reflects what your program has done and in my case, does double duty by catching keystrokes. Winamp's developer's page has examples for controlling winamp with VB and C++. I'm sure you can find Java examples too.

    So if you're changing a song, your program will send a message to Winamp to load a certain song, then you send whatever info (Song title, artist, etc) to Flash.


    Originally posted by MikeHunt79
    Here's the dilemma... I need a way to interface flash with winamp, but the only HLL i know is Java. I also have a copy of Visual C++ lying around, but i have absolutely no C++ experience, and i'm sure i could learn it overnight (or could i ).
    Since you know Java, you could probably pump something out in a few days. I suggest going with your strongest suit, Java, even though it's slower than all hell.

    What will be nice is that it will probably run in *nix fairly easily.

    Originally posted by MikeHunt79
    I`d like to use C++ because i could bulid the whole thing into one exe, and run it as the shell.
    VB creates a single exe file that you execute. Using Inno Setup, you can easily create a single setup file.

    Originally posted by MikeHunt79
    The winamp site has nothing on using java
    Did you download the gen_hotkey plugin I posted a few weeks ago? You just send keystrokes out into space and the plug-in will catch it. That will work with Java rather easily.


    Originally posted by MikeHunt79
    Another disadvantage is that i couldn`t run the program as an .exe from the shell, but i`m sure i could find someway of running it on boot up.
    Why don't you work on a quasi-embedded system? Download QNX or Slackware and build around that. God knows there are enough Windows systems out there.

    Good luck.

  5. #5
    Maximum Bitrate MikeHunt79's Avatar
    Join Date
    Aug 2001
    Location
    Cambridge & Bristol, UK
    Posts
    707

    Re: Re: C++ or JAVA for controlling winamp? (long)

    Originally posted by magnetik
    first idea, get VB6 and learn it!! If you have a good C++ knowledge then you will have no trubbles picking it up... and makes for some great rapid development.
    I don`t have any C++ knowledge at the moment I'll keep an eye open for a copy of VB tho (student = no money), i`m starting to think it is the easiest option, especially after looking at the source code for (gutters?) impee3 amp software...
    Originally posted by magnetik
    maybe speak to Charles a bit more, since his Cobra applications are coded in C/C++ and he is a total fan of the lang!!
    dunno about JAVA, but I would guess that it would be hard to use the winamp API thru the JDK..... I could be wrong, but I think a native win32 lang would make the job alot easier for you... and quicker too. JAVA can be a dog in runtime...
    This Java plug-in i got might help with that, it`s like a wrapper for winamp, but i haven`t had much time to play with it.
    Originally posted by Gutter
    This is a misconception which I've heard a few times. Flash shouldn't control anything. It only reflects what your program has done and in my case, does double duty by catching keystrokes. Winamp's developer's page has examples for controlling winamp with VB and C++. I'm sure you can find Java examples too.
    So if you're changing a song, your program will send a message to Winamp to load a certain song, then you send whatever info (Song title, artist, etc) to Flash.
    Unfortunately, the winamp site seems to have every example except Java, which is a pain. I`m sure with some info from some java sites, i could figure out how to send and recieve windows messages from Java.
    Originally posted by Gutter
    Since you know Java, you could probably pump something out in a few days. I suggest going with your strongest suit, Java, even though it's slower than all hell.
    What will be nice is that it will probably run in *nix fairly easily.
    I suppose unix compatibility is a plus (it would probably run quicker aswell - i think linux has a better vm), but i`ve never touched linux/unix at all.... but if i ever get some free time (and thats a big if), i could give it a go. Lower boot time is probably the biggest linux plus for me.
    Originally posted by Gutter
    Did you download the gen_hotkey plugin I posted a few weeks ago? You just send keystrokes out into space and the plug-in will catch it. That will work with Java rather easily.
    Good luck.
    Cheers. I`ll pick up that hotkey plug in, it sounds good, but i`m still gonna have to program routines for songtitles, etc. aren't i?
    Anyway, I`ll see how i get on with this JAVA plug-in tonight... and if it works, then i`ll write a test program.... If it`s too slow, then i'll port it to C++ next semester, as i`m taking a module which teaches C++. And if it all goes wrong, can always ask around and see if i can borrow of vb off someone
    Thanx for your help, it`s appreciated.
    PS: i`m in my very early stages, but i`ve done the main menu. It doesn`t do anything at the moment, execpt looking pretty : http://netlab.csd.anglia.ac.uk/~csd01wwm/mp3car/

  6. #6
    FLAC Gutter's Avatar
    Join Date
    Dec 1999
    Location
    Casina, Italy
    Posts
    901
    VB6 = $42.96

    http://www.provantage.com/scripts/go.dll/-s/fp_18695

    Maybe even cheaper with a student discount at some places.

    Using parts of my sourcecode and the flash frontend you made, it should be pretty easy. You'll probably grasp VB a lot faster than C++.

  7. #7
    FLAC PatO's Avatar
    Join Date
    Dec 2000
    Location
    Afton MN
    Posts
    1,120
    Get VB.
    Or, get a copy of microsoft's version of java. Check out msdn.microsoft.com for examples of interfacing it with windows apps. It's not based on the latest version of java, but will get the job done. And thanks to the *insert explicitive here* lawsuits, I doubt ms will keep updating it.

    I don't want to get off on a rant here, but think about it. The lawsuits kill java on windows machines - so the programmers turn to vb and c++. MS still has 90+ percent of the market. Java (a much more advanced language) grows in popularity, but only with enterprise websites. Who wins here?
    http://www.jeepmp3.com/
    CarPC Stolen. Starting over.
    Ne1 recognize the avatar?

  8. #8
    Maximum Bitrate MikeHunt79's Avatar
    Join Date
    Aug 2001
    Location
    Cambridge & Bristol, UK
    Posts
    707
    Originally posted by PatO
    Get VB.
    Or, get a copy of microsoft's version of java. Check out msdn.microsoft.com for examples of interfacing it with windows apps. It's not based on the latest version of java, but will get the job done. And thanks to the *insert explicitive here* lawsuits, I doubt ms will keep updating it.

    I don't want to get off on a rant here, but think about it. The lawsuits kill java on windows machines - so the programmers turn to vb and c++. MS still has 90+ percent of the market. Java (a much more advanced language) grows in popularity, but only with enterprise websites. Who wins here?
    I know, it`s really annoying that M$ hates java so much, just cause they never invented it. I'm not sure, but i don't think they invented basic or C, and yet they seem to like those HLL's a lot more... Anyway, I`ve decided that I`m gonna get VB... I`m sure it shouldn`t be too difficult too figure out, especially compared to C++. I`m still doing the flash bit at the moment, anyway.

    Thanx again for everyones help.

  9. #9
    Maximum Bitrate MikeHunt79's Avatar
    Join Date
    Aug 2001
    Location
    Cambridge & Bristol, UK
    Posts
    707

    VB 4 free!

    It`s here if anyone wants it.... It`s not version 6, i think it`s repackaged version 5, but i`m not complaining since it`s free (free... good)! I`ll see how I get on with it tonight.

    Just passing the word on, case anyone needs it.

  10. #10
    Newbie
    Join Date
    Oct 2001
    Location
    Houston, TX
    Posts
    33
    Originally posted by PatO
    Get VB.
    Or, get a copy of microsoft's version of java. Check out msdn.microsoft.com for examples of interfacing it with windows apps. It's not based on the latest version of java, but will get the job done. And thanks to the *insert explicitive here* lawsuits, I doubt ms will keep updating it.

    I don't want to get off on a rant here, but think about it. The lawsuits kill java on windows machines - so the programmers turn to vb and c++. MS still has 90+ percent of the market. Java (a much more advanced language) grows in popularity, but only with enterprise websites. Who wins here?
    Actually Microsoft bears almost all the responsibilty for the Win32 snafus with Java. They broke the Java standard by "embracing and extending" java to include things that it was never meant to have. The result? Java apps didn't work properly because Microsoft didn't stick to the standard. That lawsuit that stopped M$ from wrecking the Java standard, and today the Sun Win32 VM (that you can get at java.sun.com) works just fine. The Microsoft Win32 VM, does not.

    And you may want to consider using the Java Media Framework to play MP3's in Java. It only takes 4 lines of code:

    DataSource ds = Manager.createDataSource(new URL("file://SomeArtist - SomeSong.mp3"));
    Player p = Manager.createPlayer(ds);
    p.realize();
    p.start();

    And using the Player object you have total control over the song's playback.

Page 1 of 2 12 LastLast

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
  •