Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mpd
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Иван Мажукин
mpd
Commits
fdf0d46e
Commit
fdf0d46e
authored
Nov 03, 2008
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
player: converted PLAYER_ERROR_* to enum
parent
eca0e6db
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
9 deletions
+14
-9
player_control.c
src/player_control.c
+4
-1
player_control.h
src/player_control.h
+10
-8
No files found.
src/player_control.c
View file @
fdf0d46e
...
...
@@ -135,7 +135,7 @@ void clearPlayerError(void)
pc
.
error
=
0
;
}
int
getPlayerError
(
void
)
enum
player_error
getPlayerError
(
void
)
{
return
pc
.
error
;
}
...
...
@@ -149,6 +149,9 @@ char *getPlayerErrorStr(void)
*
error
=
'\0'
;
/* likely */
switch
(
pc
.
error
)
{
case
PLAYER_ERROR_NOERROR
:
break
;
case
PLAYER_ERROR_FILENOTFOUND
:
snprintf
(
error
,
errorlen
,
"file
\"
%s
\"
does not exist or is inaccessible"
,
...
...
src/player_control.h
View file @
fdf0d46e
...
...
@@ -50,12 +50,14 @@ enum player_command {
PLAYER_COMMAND_CANCEL
,
};
#define PLAYER_ERROR_NOERROR 0
#define PLAYER_ERROR_FILE 1
#define PLAYER_ERROR_AUDIO 2
#define PLAYER_ERROR_SYSTEM 3
#define PLAYER_ERROR_UNKTYPE 4
#define PLAYER_ERROR_FILENOTFOUND 5
enum
player_error
{
PLAYER_ERROR_NOERROR
=
0
,
PLAYER_ERROR_FILE
,
PLAYER_ERROR_AUDIO
,
PLAYER_ERROR_SYSTEM
,
PLAYER_ERROR_UNKTYPE
,
PLAYER_ERROR_FILENOTFOUND
,
};
struct
player_control
{
unsigned
int
buffered_before_play
;
...
...
@@ -63,7 +65,7 @@ struct player_control {
struct
notify
notify
;
volatile
enum
player_command
command
;
volatile
enum
player_state
state
;
volatile
int8_t
error
;
volatile
enum
player_error
error
;
uint16_t
bit_rate
;
struct
audio_format
audio_format
;
float
total_time
;
...
...
@@ -108,7 +110,7 @@ void clearPlayerError(void);
char
*
getPlayerErrorStr
(
void
);
int
getPlayerError
(
void
);
enum
player_error
getPlayerError
(
void
);
void
playerWait
(
void
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment