Update of /cvsroot/playerstage/code/stage/src
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27075
Modified Files:
model_audio.c p_audio.cc
Log Message:
audio model and player driver small fixes
Index: p_audio.cc
===================================================================
RCS file: /cvsroot/playerstage/code/stage/src/p_audio.cc,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** p_audio.cc 27 Jul 2006 02:33:02 -0000 1.1
--- p_audio.cc 27 Jul 2006 22:42:24 -0000 1.2
***************
*** 31,36 ****
typedef struct {
! char string[256];
! } test_t;
/** @addtogroup player
--- 31,36 ----
typedef struct {
! char string[STG_AUDIO_MAX_STRING_LEN];
! } audio_msg_t;
/** @addtogroup player
***************
*** 62,72 ****
// Translate the Stage-formatted sdata into the Player-formatted pdata
- // sprintf((char *)pdata.data,"Hello\n");
! test_t *mTestStruct;
! pdata.data_count = sizeof(test_t);
! mTestStruct = reinterpret_cast < test_t * >(pdata.data);
! sprintf(mTestStruct->string, "%s", sdata->recv);
// uint size = sizeof(pdata) - sizeof(pdata.data) + pdata.data_count;
--- 62,74 ----
// Translate the Stage-formatted sdata into the Player-formatted pdata
! audio_msg_t *audioMsgStruct;
! pdata.data_count = sizeof(audio_msg_t);
! audioMsgStruct = reinterpret_cast < audio_msg_t * >(pdata.data);
! sprintf(audioMsgStruct->string, "%s", sdata->recv);
!
! // clear received message once sent to the client
! sdata->recv[0]=0;
// uint size = sizeof(pdata) - sizeof(pdata.data) + pdata.data_count;
Index: model_audio.c
===================================================================
RCS file: /cvsroot/playerstage/code/stage/src/model_audio.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** model_audio.c 27 Jul 2006 02:33:02 -0000 1.1
--- model_audio.c 27 Jul 2006 22:42:24 -0000 1.2
***************
*** 1128,1132 ****
data->string);
! sprintf(trg_data->recv, "%s,%f,%f,%s", mod->token,
dists[i], recvangle, data->string);
//TODO: call model_change?!
--- 1128,1132 ----
data->string);
! sprintf(trg_data->recv, "%s,%5.2f,%5.2f,%s", mod->token,
dists[i], recvangle, data->string);
//TODO: call model_change?!
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Playerstage-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/playerstage-commit