| Feedback functions | ||||
|---|---|---|---|---|
| Function name | Purpose | Parameters | Parameter Type | Parameter purpose/valid values/notes |
| sysRadioPlayEffectSound | play a click sound effect | official documentation mentions more sound effects in future firmwares | ||
| sysRadioBusyIndicator | turns the busy indicator on or off | |||
| flag | number | 0 or 1 | ||
| sysRadioBackLightAlwaysOn | indicate whether to always keep the backlight on | only works when plugged in | ||
| flag | number | 0 or 1 | ||
| Stream info functions | ||||
| Function name | Purpose | Parameters | Parameter Type | Parameter purpose/valid values/notes |
| sysRadioGetRelatedPageUrl | gets the related URL of the current stream, if available. shoutcast streams tend to provide this | |||
| sysRadioGetStreamUrl | gets the URL of the current stream | |||
| sysRadioGetContentMetaInfo | gets metainfo about the current stream | |||
| charCodeConvertOption | number | 0: No conversion 1: SJIS (CP932) to UTF-8 2: EUC-KR (CP949) to UTF-8 | ||
| sysRadioGetStreamIpAddress | gets the IP of the current stream | |||
| sysRadioGetStreamPort | gets the port of the current stream | |||
| sysRadioGetStreamTitle | returns the name of the station (the title) | |||
| Sound effect functions | ||||
| Function name | Purpose | Parameters | Parameter Type | Parameter purpose/valid values/notes |
| sysRadioSetAudioCutOffWidth | applies a frequency cutoff range to the audio stream | |||
| val | number | -256 to 256 | ||
| sysRadioSetAudioShiftWidth | applies a sweeping phase shift to the audio stream | |||
| val | number | -256 to 256 | ||
| sysRadioSetAudioPitchShiftWidth | sets the range of frequency change used in the random pitch bending in the sine wave oscillator | |||
| val | number | -256 to 256 | ||
| sysRadioSetSineWaveOscillatorFrequencyAndVolume | play a frequency that can be shifted randomly; play morse code translation of text | |||
| freq | number | frequency in Hz, 0 to 22500 | ||
| vol | number | volume, 0 to 255 | ||
| tension | number | degree of frequency variation, 0 to 255; smaller value = faster variation | ||
| cwtext | string | morse code text | ||
| keyingspeed | number | speed of the morse code, 0 to 32 | ||
| sysRadioSetWhiteNoiseOscillatorVolume | set the parameters of the white noise generator | |||
| vol | number | volume, 0 to 255 | ||
| lowF | number | minimum frequency in Hz, 0 to 22500 | ||
| highF | number | maximum frequency in Hz, 0 to 22500 | ||
| tension | number | degree of frequency variation, 0 to 255; smaller value = faster variation | ||
| HTTP downloading functions | ||||
| Function name | Purpose | Parameters | Parameter Type | Parameter purpose/valid values/notes |
| sysRadioPrepareForHttpGet | prepare to execute an HTTP transaction | |||
| url | string | the URL to download | ||
| userAgentName | string | the user agent to use | ||
| length | number | the amount of data to download (maximum - if the file is smaller than this, it'll load OK) 0 to 49152 | ||
| charCodeConvertOption | number | 0: No conversion 1: SJIS (CP932) to UTF-8 2: EUC-KR (CP949) to UTF-8 | ||
| sysRadioGetHttpGetStatus | returns the current HTTP transaction status | return values: 1 or -1 = still processing 0 = complete if the transaction is complete and this returns -1, there was an error | ||
| sysRadioGetHttpGetResult | returns the data downloaded in the HTTP transaction | |||
| sysRadioHttpGetTerminate | terminate the HTTP GET transaction and clear up resources | |||
| Playback functions | ||||
| Function name | Purpose | Parameters | Parameter Type | Parameter purpose/valid values/notes |
| sysRadioSetSubVolume | set the volume of JUST the stream playback; leave other volumes alone | |||
| vol | number | volume level, 0 to 255 | ||
| sysRadioSetMasterVolume | set the master volume (streaming audio volume AND generated audio volume) | |||
| vol | number | volume level, 0 to 255 | ||
| sysRadioStop | stop audio playback | |||
| mode | number | 0: all audio (including plugin-generated audio) 1: only streaming audio | ||
| sysRadioPlayPls | parse and play a PLS stream playlist | |||
| url | string | URL of PLS playlist to play (e.g. Shoutcast) | ||
| userAgentName0 | string | user agent to use for getting the PLS | ||
| userAgentName1 | string | user agent to use for getting the stream | ||
| sysRadioPlayM3u | parse and play a M3U stream playlist | |||
| url | string | URL of M3U playlist to play (e.g. Shoutcast) | ||
| userAgentName0 | string | user agent to use for getting the M3U | ||
| userAgentName1 | string | user agent to use for getting the stream | ||
| sysRadioPlayStream | play a raw MP3/AAC stream | |||
| url | string | URL of stream playlist to play (e.g. Shoutcast) | ||
| userAgentName | string | user agent to use for getting the stream | ||
| Analysis/diagnosis functions | ||||
| Function name | Purpose | Parameters | Parameter Type | Parameter purpose/valid values/notes |
| sysRadioGetLeftAudioPeakLevel | get current left channel level | |||
| sysRadioGetLeftAudioAverageLevel | get average left channel level | new in 5.00 | ||
| sysRadioGetRightAudioPeakLevel | get current right channel level | |||
| sysRadioGetRightAudioAverageLevel | get current right channel level | new in 5.00 | ||
| sysRadioGetAudioSoundDistortionRate | get sound distortion rate (how much the audio is distorted by frame dropping) | |||
| sysRadioGetStreamBufferLevel | get stream buffer level | |||
| sysRadioGetNetworkBandQuality | get stream connection quality | |||
| sysRadioGetPlayerCoreVersionInfo | gets the core version info of the player | PSP Slim, FW 3.80: returns 'PSP2000:RadioPlayerCore_3.8.0' PSP Slim, FW 3.90: returns 'PSP2000:RadioPlayerCore_3.9.0' PSP Slim, FW 5.00: returns 'PSP2000:RadioPlayerCore_5.0.0' | ||
| sysRadioGetPlayerStatus | gets the player status | return values: 0: idle 1: playing audio stream 2: retrieving m3u/pls 3: analyzing m3u/pls 4: connecting to server -1: error | ||
| sysRadioGetBitRate | gets the bitrate of the stream | |||
| sysRadioGetSamplingRate | gets the sampling rate of the stream | |||
| sysRadioCapabilityCheck | determines if the current radio player has various capabilities | 0: check for AAC Plus support 1: check for sleep support | ||
| id | number | Unknown | ||
| String functions | ||||
| Function name | Purpose | Parameters | Parameter Type | Parameter purpose/valid values/notes |
| sysRadioPrepareForStrOperation | prepare for a string for string operations (crop to max. length, convert to usable text) | |||
| str | string | string to operate on; max. length is 51199 | ||
| sysRadioStrLength | return the length of the current string | |||
| sysRadioStrIndexOf | search for a string in the current string; returns the starting position | |||
| pattern | string | string to search for | ||
| startPos | number | starting position for search | ||
| sysRadioStrSlice | return the piece of the current string starting at X and ending at Y | |||
| startPos | number | beginning position | ||
| endPos | number | ending position | ||
| sysRadioStrOperationTerminate | terminate string processing | |||
| sysRadioCharacterEntityConvert | converts a string containing entities (e.g. ) to a normal string | |||
| str | string | max. length is 511 | ||
| sysRadioStrCharCodeAt | returns the character code of a character at a given position in the current string | |||
| pos | number | new in 5.00 | ||
| Interaction functions | ||||
| Function name | Purpose | Parameters | Parameter Type | Parameter purpose/valid values/notes |
| sysRadioGetAnalogStickXValue | get the X position of the analog stick | returns 0 if square isn't pressed | ||
| sysRadioGetAnalogStickYValue | get the Y position of the analog stick | returns 0 if square isn't pressed | ||
| sysRadioGetAnalogStickAngleValue | get the polar angle of the analog stick | returns 0 if square isn't pressed | ||
| sysRadioGetAnalogStickRadiusValue | get the polar radius of the analog stick | returns 0 if square isn't pressed | ||
| sysRadioGetStartButtonToggleStatus | with the plugin active, the start button acts as a toggle switch; each press toggles 1 or 0. this checks its state. | |||
| Debug functions | ||||
| Function name | Purpose | Parameters | Parameter Type | Parameter purpose/valid values/notes |
| sysRadioSetDebugMode | switch in and out of debug mode | |||
| flag | number | when set to 1, this is the only mode where a screenshot can be taken or the debug log can be displayed. | ||
| sysRadioSetDebugLogTextStyle | set the style, color, and alignment of the debug log | the official player uses (224,224,224,255,255,255,255,255,30,30,40,96,1,0,1) | ||
| R1, G1, B1, A1 | numbers | red, green, blue, and alpha values for the top half of the gradient on the text (0-255) | ||
| R2, G2, B2, A2 | numbers | red, green, blue, and alpha values for the bottom half of the gradient on the text (0-255) | ||
| R3, G3, B3, A3 | numbers | red, green, blue, and alpha values for the background (0-255) - optional | ||
| style | number | 0: normal 1: bold | ||
| alignment | number | 0: left 1: center 2: right | ||
| sysRadioDebugLog | print to the debug log | debug log notes: text wraps at 37 chars; max. of 16 rows on screen. if more are added, the log scrolls. \n can be used to add line breaks pressing the home/PS button or bringing up the OSK/network connection screen clears the log | ||
| str | string | string to print | ||
| sysRadioClearDebugLog | clear the debug log | |||
| Memory stick reading functions | ||||
| Function name | Purpose | Parameters | Parameter Type | Parameter purpose/valid values/notes |
| sysRadioGetMediaInOutStatus | check to see if a memory stick is inserted | return values: 0: inserted 1: ejected 2: re-inserted | ||
| sysRadioPrepareForScanDir | initialize a directory scan for the given path | passing no args = initialize a directory scan for ms0:/ | ||
| path | string | path to scan | ||
| sysRadioScanDir | return the next file in the list (each successive call gets another file name) | |||
| Miscellaneous functions | ||||
| Function name | Purpose | Parameters | Parameter Type | Parameter purpose/valid values/notes |
| sysRadioSleep | put the PSP to sleep | waits about 10 seconds first | ||
| sysRadioCaptureScreenShot | capture a screenshot | Must call sysRadioSetDebugMode(1) first before you can take screenshots. You can bypass the need for pressing a button by pressing R+Start while in debug mode; this calls sysRadioPlayEffectSound() then sysRadioCaptureScreenShot(). saves to /PICTURE/RADIOPLAYER SCREENSHOT/RP-[date]-[time].BMP | ||
| As-yet unknown functions | ||||
| Function name | Purpose | Parameters | Parameter Type | Parameter purpose/valid values/notes |
| sysRadioSetRetryIntervalTime | Unknown | Unknown | REMOVED in firmware 3.90 | |
| sysRadioGetSystemStatus | Unknown | new in 5.00 | ||
| x | Unknown | only one argument, and no matter what I pass, it returns 0 | ||
| sysRadioCharacterCodeConvert | Unknown | new in 5.00 | ||
| str | string | Unknown | ||