Hello,
I'd like to hear music in my homebrew, on thebackground. that's done, but now when i ear a mp3-song. I see information about that song in my screen. I don't like that cause i'd like to hear the mp3 on the background and without any controls for play and pause. Maybe someone can help;
Message in homebrew:
recoverable frame level error (lost synchronization) // This is on the top of the screen
128 kb/s audio MPEG layer III stream at 4410 mhz  // This is on the bottom of the screen
Source:
int main()
{
    scePowerSetClockFrequency(333, 333, 166);
    pspDebugScreenInit();
    SetupCallbacks();
    pspAudioInit();
    SceCtrlData pad;
    int i;
    char buffer[200];
    Image* ourImage;
    initGraphics();
    sprintf(buffer, "background.PNG");
    ourImage = loadImage(buffer);
    MP3_Init(1);
    MP3_Load("music.mp3");
    MP3_Play();
    while(1)
    {
        sceCtrlReadBufferPositive(&pad, 1);
        if(pad.Buttons & PSP_CTRL_CROSS)
        {
            break;
        }
        else if(pad.Buttons & PSP_CTRL_CIRCLE)
        {
            MP3_Pause();
            for(i=0; i<10; i++)
            {
                sceDisplayWaitVblankStart();
            }
        }
        if (MP3_EndOfStream() == 1)
        {
            MP3_Stop();
        }
    }
    if (!ourImage)
    {
        //Image load failed
        printf("Image load failed!\n");
    }
    else
    {
        /* If the loadImage function */
        int x = 0;
        int y = 0;
        sceDisplayWaitVblankStart();
        while (x < 480)
        {
            while (y < 272)
            {
                blitAlphaImageToScreen(0 ,0 ,480 , 272, ourImage, x, y);
                y += 272;
            }
            x += 480;
            y = 0;
        }
        flipScreen();
    }
    MP3_Stop();
    MP3_FreeTune();
----------------------------------------
Hope someone can help, thanks
// Grtzzzz
			
			
									
									Message when listining MP3 in homebrew
Message when listining MP3 in homebrew
C/C++ Noob/Beginner
						The code for that output is within mp3player.c. Just #undef printf after the includes and the prints shouldn't appear on screen anymore.
			
			
									
									<Don't push the river, it flows.>
http://wordpress.fx-world.org - my devblog
http://wiki.fx-world.org - VFPU documentation wiki
Alexander Berl
						http://wordpress.fx-world.org - my devblog
http://wiki.fx-world.org - VFPU documentation wiki
Alexander Berl
Copy and pasting code from 2 / 3 of his tutorials is not good either, thats when you end up with code like that. (No indentation, etc)
Also, use...
			
			
									
									
						Also, use...
Code: Select all
[code][/code]I've done the #undef printf in the mp3player.c but i still see a message in the homebrew.
-------------------------
http://www.megaupload.com/?d=O0ZYVQEK
Thats the download of my source :)
But i don't really now how i can fix this. So i've the whole source + mp3 + png uploaded on Megaupload. Hope that someone will/can fix the code for me. Thank you all very very much :D
Excuses for not using [ code ], on our PSP website we have the same forum so i know how this works :)
// JoRDozZzz
			
			
									
									Code: Select all
// mp3player.c: MP3 Player Implementation in C for Sony PSP
//
////////////////////////////////////////////////////////////////////////////
#include <pspkernel.h>
#include <pspdebug.h>
#include <pspiofilemgr.h>
#include <pspdisplay.h>
#include <stdlib.h>
#include <string.h>
#include <limits.h>
#include <errno.h>
#include <pspaudiolib.h>
#include "mp3player.h"
#undef printf 
#define FALSE 0
#define TRUE !FALSE
#define min(a,b) (((a)<(b))?(a):(b))
#define max(a,b) (((a)>(b))?(a):(b))
#define MadErrorString(x) mad_stream_errorstr(x)
#define INPUT_BUFFER_SIZE	(5*8192)
#define OUTPUT_BUFFER_SIZE	2048-------------------------
http://www.megaupload.com/?d=O0ZYVQEK
Thats the download of my source :)
But i don't really now how i can fix this. So i've the whole source + mp3 + png uploaded on Megaupload. Hope that someone will/can fix the code for me. Thank you all very very much :D
Excuses for not using [ code ], on our PSP website we have the same forum so i know how this works :)
// JoRDozZzz
C/C++ Noob/Beginner
						

