mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-11-14 07:32:35 -05:00
Accept FS #10244 by Wincent Balin: more pdbox work done for GSoC; also some keyword and line-ending fixes by me
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21626 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
eabeb928dd
commit
0d4560cb03
113 changed files with 10637 additions and 4420 deletions
|
|
@ -1,9 +1,14 @@
|
|||
|
||||
#ifdef ROCKBOX
|
||||
#include "plugin.h"
|
||||
#include "pdbox.h"
|
||||
#else /* ROCKBOX */
|
||||
#include <sys/socket.h>
|
||||
#include <netinet/in.h>
|
||||
#include <netinet/tcp.h>
|
||||
#include <netdb.h>
|
||||
#include <stdio.h>
|
||||
#endif /* ROCKBOX */
|
||||
|
||||
#include "m_pd.h"
|
||||
#include "m_imp.h"
|
||||
|
|
@ -21,8 +26,19 @@ static t_int x_fd = -1;
|
|||
|
||||
|
||||
|
||||
static void ipod_connect()
|
||||
static void ipod_connect(void)
|
||||
{
|
||||
#ifdef ROCKBOX
|
||||
if (x_fd >= 0)
|
||||
{
|
||||
error("ipod_connect: already connected");
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
x_fd++;
|
||||
}
|
||||
#else /* ROCKBOX */
|
||||
struct sockaddr_in server;
|
||||
struct hostent *hp;
|
||||
int sockfd;
|
||||
|
|
@ -65,6 +81,7 @@ static void ipod_connect()
|
|||
}
|
||||
post("connected %s %d",hostname,portno);
|
||||
x_fd = sockfd;
|
||||
#endif /* ROCKBOX */
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -72,8 +89,13 @@ static void ipod_connect()
|
|||
static void ipod_bang(t_ipod *x)
|
||||
{
|
||||
static char sendme[200];
|
||||
#ifdef ROCKBOX
|
||||
snprintf(sendme, sizeof(sendme)-1, "%s bang;\n", x->x_what->s_name);
|
||||
SEND_FROM_CORE(sendme);
|
||||
#else /* ROCKBOX */
|
||||
sprintf(sendme,"%s bang;\n",x->x_what->s_name);
|
||||
send(x_fd,sendme,strlen(sendme),0);
|
||||
#endif /*ROCKBOX */
|
||||
|
||||
// if (x->x_sym->s_thing) pd_bang(x->x_sym->s_thing);
|
||||
}
|
||||
|
|
@ -81,9 +103,19 @@ static void ipod_bang(t_ipod *x)
|
|||
static void ipod_float(t_ipod *x, t_float f)
|
||||
{
|
||||
static char sendme[200];
|
||||
#ifdef ROCKBOX
|
||||
char f_buf[32];
|
||||
|
||||
ftoan(f, f_buf, sizeof(f_buf)-1);
|
||||
strcpy(sendme, x->x_what->s_name);
|
||||
strcat(sendme, " ");
|
||||
strcat(sendme, f_buf);
|
||||
|
||||
SEND_FROM_CORE(sendme);
|
||||
#else /* ROCKBOX */
|
||||
sprintf(sendme,"%s %f;\n",x->x_what->s_name,f);
|
||||
send(x_fd,sendme,strlen(sendme),0);
|
||||
#endif /* ROCKBOX */
|
||||
|
||||
// post("forwarding float %s",x->x_what->s_name);
|
||||
// if (x->x_sym->s_thing) pd_float(x->x_sym->s_thing, f);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue