Update of /cvsroot/playerstage/code/player/client_libs/libplayerc++
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31238
Modified Files:
audioproxy.cc playerc++.h
Log Message:
Added support for audio interface state information
Index: playerc++.h
===================================================================
RCS file:
/cvsroot/playerstage/code/player/client_libs/libplayerc++/playerc++.h,v
retrieving revision 1.70
retrieving revision 1.71
diff -C2 -d -r1.70 -r1.71
*** playerc++.h 7 Aug 2006 14:17:59 -0000 1.70
--- playerc++.h 24 Aug 2006 00:25:14 -0000 1.71
***************
*** 247,250 ****
--- 247,252 ----
/** @brief Get Sequence item */
player_audio_mixer_channel_t GetChannel(int aIndex) const
{return(GetVar(mDevice->mixer_data.channels[aIndex]));};
+ /** @brief Get driver state */
+ uint32_t GetState(void) const {return(GetVar(mDevice->state));};
***************
*** 904,941 ****
/// destructor
~HealthProxy();
!
/// Get idle CPU load in percents
! float GetIdleCPU();
!
/// Get system CPU load in percents
float GetSystemCPU();
!
/// Get user CPU load in percents
float GetUserCPU();
!
/// Get total amount of memory
int64_t GetMemTotal();
!
/// Get amount of memory used
int64_t GetMemUsed();
!
/// Get amount of free memory
int64_t GetMemFree();
!
/// Get total amount of swap
int64_t GetSwapTotal();
!
/// Get amount of swap used
int64_t GetSwapUsed();
!
/// Get amount of free swap space
int64_t GetSwapFree();
!
/// Get percentage of used RAM
float GetPercMemUsed();
!
/// Get percentage of used SWAP
float GetPercSwapUsed();
!
/// Get percentage of totally used memory (swap and ram)
float GetPercTotalUsed();
--- 906,943 ----
/// destructor
~HealthProxy();
!
/// Get idle CPU load in percents
! float GetIdleCPU();
!
/// Get system CPU load in percents
float GetSystemCPU();
!
/// Get user CPU load in percents
float GetUserCPU();
!
/// Get total amount of memory
int64_t GetMemTotal();
!
/// Get amount of memory used
int64_t GetMemUsed();
!
/// Get amount of free memory
int64_t GetMemFree();
!
/// Get total amount of swap
int64_t GetSwapTotal();
!
/// Get amount of swap used
int64_t GetSwapUsed();
!
/// Get amount of free swap space
int64_t GetSwapFree();
!
/// Get percentage of used RAM
float GetPercMemUsed();
!
/// Get percentage of used SWAP
float GetPercSwapUsed();
!
/// Get percentage of totally used memory (swap and ram)
float GetPercTotalUsed();
***************
*** 2188,2194 ****
~SpeechRecognitionProxy();
/// Accessor method for getting speech recognition data i.e. words.
! std::string GetWord(uint aWord) const{
scoped_lock_t lock(mPc->mMutex);
! return std::string(mDevice->words[aWord]);
}
--- 2190,2196 ----
~SpeechRecognitionProxy();
/// Accessor method for getting speech recognition data i.e. words.
! std::string GetWord(uint aWord) const{
scoped_lock_t lock(mPc->mMutex);
! return std::string(mDevice->words[aWord]);
}
Index: audioproxy.cc
===================================================================
RCS file:
/cvsroot/playerstage/code/player/client_libs/libplayerc++/audioproxy.cc,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** audioproxy.cc 18 Jun 2006 19:33:31 -0000 1.4
--- audioproxy.cc 24 Aug 2006 00:25:14 -0000 1.5
***************
*** 85,88 ****
--- 85,89 ----
int NumChannels = a.GetChannelCount();
int MinChan = NumChannels < NumChannelDetails ? NumChannels :
NumChannelDetails;
+ uint32_t state = a.GetState();
os << MinChan << " channels:" << std::endl;
***************
*** 100,103 ****
--- 101,113 ----
}
+ cout << "State:\t";
+ if (state & PLAYER_AUDIO_STATE_PLAYING)
+ cout << "Playing\t";
+ if (state & PLAYER_AUDIO_STATE_RECORDING)
+ cout << "Recording";
+ if (state == PLAYER_AUDIO_STATE_STOPPED)
+ cout << "Stopped";
+ cout << std::endl;
+
os.precision(old_precision);
os.flags(old_flags);
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Playerstage-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/playerstage-commit