Commit bf7b6262 authored by Sam Lantinga's avatar Sam Lantinga

Date: Sat, 13 Sep 2003 15:50:43 +0300

From: "Mike Gorchak"
Subject: QNX fixes

improved sound code for the QNX, added workarounds for known bugs, fixed photon detect code. Update .qpg file.

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%40719
parent 794bba8f
......@@ -78,7 +78,7 @@ script you must manually delete the libtool.m4 stuff from the acinclu-
de.m4 file (it comes after the ESD detection code up to the end of the
file), because the libtool stuff in the acinclude.m4 file is very old
and doesn't know anything about QNX. Just remove it, then run
"libtoolize --force --copy" and after that run autogen.sh.
"libtoolize --force --copy" and after that run the autogen.sh script.
======================================================================
Some building issues:
......
......@@ -52,6 +52,7 @@
</QPG:Files>
<QPG:PackageFilter>
<QPM:PackageManifest>
<QPM:PackageDescription>
<QPM:PackageType>Library</QPM:PackageType>
<QPM:PackageName>SDL</QPM:PackageName>
......@@ -59,6 +60,7 @@
<QPM:PackageRepository>http://qnx.org.ru/repository</QPM:PackageRepository>
<QPM:FileVersion>2.0</QPM:FileVersion>
</QPM:PackageDescription>
<QPM:ProductDescription>
<QPM:ProductName>SDL</QPM:ProductName>
<QPM:ProductIdentifier>SDL</QPM:ProductIdentifier>
......@@ -74,11 +76,12 @@
<QPM:AuthorEmail>slouken@libsdl.org</QPM:AuthorEmail>
<QPM:ProductIconSmall/>
<QPM:ProductIconLarge/>
<QPM:ProductDescriptionShort>This is the Simple DirectMedia Layer, a generic API that provides low level access to audio, keyboard, mouse, and display framebuffer across multiple platforms.</QPM:ProductDescriptionShort>
<QPM:ProductDescriptionLong>This is the Simple DirectMedia Layer, a generic API that provides low level access to audio, keyboard, mouse, and display framebuffer across multiple platforms. This is the libraries, include files and other resources you can use to develop and run SDL applications.</QPM:ProductDescriptionLong>
<QPM:ProductDescriptionShort>This is the Simple DirectMedia Layer (SDL), a generic API that provides low level access to audio, keyboard, mouse, and display framebuffer across multiple platforms.</QPM:ProductDescriptionShort>
<QPM:ProductDescriptionLong>This is the Simple DirectMedia Layer (SDL), a generic API that provides low level access to audio, keyboard, mouse, and display framebuffer across multiple platforms. This is the libraries, include files and other resources you can use to develop and run SDL applications.</QPM:ProductDescriptionLong>
<QPM:ProductDescriptionURL>http://www.libsdl.org</QPM:ProductDescriptionURL>
<QPM:ProductDescriptionEmbedURL/>
</QPM:ProductDescription>
<QPM:ReleaseDescription>
<QPM:ReleaseVersion>@VERSION@</QPM:ReleaseVersion>
<QPM:ReleaseUrgency>High</QPM:ReleaseUrgency>
......@@ -87,25 +90,53 @@
<QPM:ReleaseNoteMajor/>
<QPM:ReleaseBuild>1</QPM:ReleaseBuild>
<QPM:CountryExclude/>
<QPM:ReleaseCopyright>GNU General Public License</QPM:ReleaseCopyright>
<QPM:ReleaseCopyright>GNU Lesser General Public License</QPM:ReleaseCopyright>
</QPM:ReleaseDescription>
<QPM:ContentDescription>
<QPM:ContentTopic>Software Development/Libraries and Extensions/C Libraries</QPM:ContentTopic>
<QPM:ContentTopic xmlmultiple="true">Software Development/Libraries and Extensions/C Libraries</QPM:ContentTopic>
<QPM:ContentKeyword>SDL, audio, graphics, demos, games, emulators, media, layer</QPM:ContentKeyword>
<QPM:Processor/>
<QPM:TargetProcessor/>
<QPM:TargetOS>qnx6</QPM:TargetOS>
<QPM:HostOS>qnx6</QPM:HostOS>
<QPM:DisplayEnvironment>Photon</QPM:DisplayEnvironment>
<QPM:TargetAudience>Developer</QPM:TargetAudience>
<QPM:TargetAudience>User</QPM:TargetAudience>
<QPM:HostOS>none</QPM:HostOS>
<QPM:DisplayEnvironment xmlmultiple="true">Photon</QPM:DisplayEnvironment>
<QPM:TargetAudience xmlmultiple="true">Developer</QPM:TargetAudience>
<QPM:TargetAudience xmlmultiple="true">User</QPM:TargetAudience>
</QPM:ContentDescription>
<QPM:LicenseUrl>repdata://LicenseUrl/COPYING</QPM:LicenseUrl>
</QPM:PackageManifest>
</QPG:PackageFilter>
<QPG:PackageFilter proc="none" target="none">
<QPM:PackageManifest>
<QPM:ProductInstallationDependencies>
<QPM:ProductRequirements></QPM:ProductRequirements>
</QPM:ProductInstallationDependencies>
</QPM:PackageManifest>
</QPG:PackageFilter>
<QPG:PackageFilter proc="x86" target="none">
<QPM:PackageManifest>
<QPM:ProductInstallationDependencies>
<QPM:ProductRequirements/>
<QPM:ProductRequirements></QPM:ProductRequirements>
</QPM:ProductInstallationDependencies>
</QPM:PackageManifest>
</QPG:PackageFilter>
<QPG:PackageFilter proc="none" target="x86">
<QPM:PackageManifest>
<QPM:ProductInstallationDependencies>
<QPM:ProductRequirements></QPM:ProductRequirements>
</QPM:ProductInstallationDependencies>
</QPM:PackageManifest>
</QPG:PackageFilter>
<QPG:PackageFilter proc="x86" target="x86">
<QPM:PackageManifest>
<QPM:ProductInstallationDependencies>
<QPM:ProductRequirements></QPM:ProductRequirements>
</QPM:ProductInstallationDependencies>
</QPM:PackageManifest>
</QPG:PackageFilter>
</QPG:Values>
</QPG:Generation>
This diff is collapsed.
......@@ -20,36 +20,47 @@
slouken@libsdl.org
*/
#ifndef _NTO_PCM_audio_h
#define _NTO_PCM_audio_h
#ifndef __SDL_NTO_AUDIO_H__
#define __SDL_NTO_AUDIO_H__
#include "SDL_sysaudio.h"
#include <sys/asoundlib.h>
/* Hidden "this" pointer for the video functions */
/* Hidden "this" pointer for the audio functions */
#define _THIS SDL_AudioDevice *this
struct SDL_PrivateAudioData {
/* The audio device handle */
snd_pcm_t *audio_handle;
struct SDL_PrivateAudioData
{
/* The audio device handle */
int cardno;
int deviceno;
snd_pcm_t* audio_handle;
/* The audio file descriptor */
int audio_fd;
/* The audio file descriptor */
int audio_fd;
/* The parent process id, to detect when application quits */
pid_t parent;
/* The parent process id, to detect when application quits */
pid_t parent;
/* Raw mixing buffer */
Uint8 *pcm_buf;
int pcm_len;
/* Raw mixing buffer */
Uint8* pcm_buf;
Uint32 pcm_len;
/* QSA parameters */
snd_pcm_channel_status_t cstatus;
snd_pcm_channel_params_t cparams;
snd_pcm_channel_setup_t csetup;
};
#define FUDGE_TICKS 10 /* The scheduler overhead ticks per frame */
/* Old variable names */
#define audio_handle (this->hidden->audio_handle)
#define audio_fd (this->hidden->audio_fd)
#define parent (this->hidden->parent)
#define pcm_buf (this->hidden->pcm_buf)
#define pcm_len (this->hidden->pcm_len)
#define cardno (this->hidden->cardno)
#define deviceno (this->hidden->deviceno)
#define audio_handle (this->hidden->audio_handle)
#define audio_fd (this->hidden->audio_fd)
#define parent (this->hidden->parent)
#define pcm_buf (this->hidden->pcm_buf)
#define pcm_len (this->hidden->pcm_len)
#define cstatus (this->hidden->cstatus)
#define cparams (this->hidden->cparams)
#define csetup (this->hidden->csetup)
#endif /* _NTO_PCM_audio_h */
#endif /* __SDL_NTO_AUDIO_H__ */
......@@ -64,19 +64,23 @@ static void* ph_GL_GetProcAddress(_THIS, const char* proc);
static int ph_GL_MakeCurrent(_THIS);
#endif /* HAVE_OPENGL */
static int phstatus=-1;
static int ph_Available(void)
{
int phstat=-1;
phstat=PtInit(0);
if (phstat==0)
{
return 1;
}
else
if (phstatus==-1)
{
return 0;
phstatus=PtInit(NULL);
if (phstatus==0)
{
return 1;
}
else
{
return 0;
}
}
return 1;
}
static SDL_VideoDevice *ph_CreateDevice(int devindex)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment