Welcome, Guest. Please login or register. Did you miss your activation email?

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Topics - Psychohyena

Pages: [1]
1
Graphics / Complex Image Handling
« on: May 04, 2011, 02:21:19 pm »
Hi Guys,

So cutting to the chase and avoiding beating around the bush here is what I want to do:

I have created a .dat file (binary) which contains the Uint8 information for a jpg. What I want to do is using iostream load that file into my application and then load it into an sf::Image.

So far I can restore the information into the application as Data (void*) where I get stuck is the converting this information back into Uint8. Does anyone have any ideas as to how I might do this?

Cheers,

Aaron

2
Audio / [Resolved] Moving to next or previous song
« on: March 28, 2010, 12:06:46 pm »
I'm writing a program which as a side thing will have a jukebox feature.

The problem I have run into is that when moving to the next song or a previous song, the program gets the filename from the jukebox class and then opens the file.

minimal Jukebox code:
Code: [Select]

class Jukebox
{
    public  :
                //Load next song.
                std::string LoadSong()
                {
                    std::stringstream Filename;
                    Filename << MusicLoca.c_str() << MusicList[(lastSong+1)].c_str();
                    lastSong += 1;
                    std::cout<<Filename.str() << lastSong;
                    return Filename.str();
                }
private :
    std::string MusicLoca;
    std::string MusicList[19];
    int lastSong;
}


Access from main program:
Code: [Select]
Music.OpenFromFile(myJukebox.LoadSong());
        Music.Play();//Works
        Sleep(1000);
        Music.Stop();
        Music.OpenFromFile(myJukebox.LoadSong());
        Music.Play();//Doesn't work.


Now I know the Filename is being returned because of the std::cout.
I believe the issue is that I'm not using the sf::Music class correctly. If anyone can help that would be great.

Cheers,
Psychohyena

Pages: [1]
anything