* More header cleanup, continuing korli's work.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36206 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler
2010-04-13 09:48:02 +00:00
parent 2d4ce06468
commit f46308c92a
21 changed files with 623 additions and 769 deletions
+9 -8
View File
@@ -1,10 +1,12 @@
/* /*
** Copyright 2002-04, Thomas Kurschel. All rights reserved. * Copyright 2002-2004, Thomas Kurschel. All rights reserved.
** Distributed under the terms of the OpenBeOS License. * Distributed under the terms of the MIT License.
*/ */
#ifndef _SCSI_BUS_RAW_DRIVER_H
#define _SCSI_BUS_RAW_DRIVER_H
/*
Part of Open SCSI bus manager /*! Part of Open SCSI bus manager
Devfs entry for raw bus access. Devfs entry for raw bus access.
@@ -13,11 +15,10 @@
be retrieved from. be retrieved from.
*/ */
#ifndef _SCSI_BUS_RAW_DRIVER_H
#define _SCSI_BUS_RAW_DRIVER_H
#include <Drivers.h> #include <Drivers.h>
// we start with +300 to not collide with any other SCSI opcode defined // we start with +300 to not collide with any other SCSI opcode defined
// in scsiprobe_driver.h or scsi.h; // in scsiprobe_driver.h or scsi.h;
// all ioctl calls return the subsystem status (see SCSI.h) // all ioctl calls return the subsystem status (see SCSI.h)
@@ -26,4 +27,4 @@ enum {
B_SCSI_BUS_RAW_PATH_INQUIRY B_SCSI_BUS_RAW_PATH_INQUIRY
}; };
#endif #endif /* _SCSI_BUS_RAW_DRIVER_H */
+5 -5
View File
@@ -1,7 +1,7 @@
/* File System and Drivers select support /*
** * Copyright 2004-2010, Haiku, Inc. All Rights Reserved.
** Distributed under the terms of the Haiku License. * Distributed under the terms of the MIT License.
*/ */
#ifndef _DRIVERS_SELECT_H #ifndef _DRIVERS_SELECT_H
#define _DRIVERS_SELECT_H #define _DRIVERS_SELECT_H
@@ -37,4 +37,4 @@ extern status_t notify_select_event(struct selectsync *sync, uint8 event);
} }
#endif #endif
#endif /* _DRIVERS_SELECT_H */ #endif /* _DRIVERS_SELECT_H */
+8 -7
View File
@@ -1,10 +1,12 @@
/* /*
** Copyright 2002/03, Thomas Kurschel. All rights reserved. * Copyright 2002-2003, Thomas Kurschel. All rights reserved.
** Distributed under the terms of the OpenBeOS License. * Distributed under the terms of the MIT License.
*/ */
#ifndef _ISA2_H
#define _ISA2_H
/*
ISA bus manager /*! ISA bus manager
This is an improper name - this bus manager uses the PnP manager to This is an improper name - this bus manager uses the PnP manager to
load device drivers, but calling it ISA PnP manager would be wrong as load device drivers, but calling it ISA PnP manager would be wrong as
@@ -24,12 +26,11 @@
meanwhile. meanwhile.
*/ */
#ifndef _ISA2_H
#define _ISA2_H
#include <device_manager.h> #include <device_manager.h>
#include <ISA.h> #include <ISA.h>
// maximum size of one dma transfer // maximum size of one dma transfer
// (in bytes for 8 bit transfer, in words for 16 bit transfer) // (in bytes for 8 bit transfer, in words for 16 bit transfer)
#define B_MAX_ISA_DMA_COUNT 0x10000 #define B_MAX_ISA_DMA_COUNT 0x10000
+8 -7
View File
@@ -1,10 +1,12 @@
/* /*
** Copyright 2002/03, Thomas Kurschel. All rights reserved. * Copyright 2002-2003, Thomas Kurschel. All rights reserved.
** Distributed under the terms of the OpenBeOS License. * Distributed under the terms of the MIT License.
*/ */
#ifndef __LOCKED_POOL_H__
#define __LOCKED_POOL_H__
/*
Paging-safe allocation of locked memory. /*! Paging-safe allocation of locked memory.
Library for managing temporary, locked memory with the condition of Library for managing temporary, locked memory with the condition of
not calling any function during allocation that can lead to paging. not calling any function during allocation that can lead to paging.
@@ -28,11 +30,10 @@
pool is allocated. pool is allocated.
*/ */
#ifndef __LOCKED_POOL_H__
#define __LOCKED_POOL_H__
#include <device_manager.h> #include <device_manager.h>
typedef struct locked_pool *locked_pool_cookie; typedef struct locked_pool *locked_pool_cookie;
typedef status_t (*locked_pool_add_hook)(void *block, void *arg); typedef status_t (*locked_pool_add_hook)(void *block, void *arg);
+70 -85
View File
@@ -1,34 +1,17 @@
//------------------------------------------------------------------------------ /*
// Copyright (c) 2001-2002, OpenBeOS * Copyright 2001-2002, Haiku Inc. All Rights Reserved.
// * Distributed under the terms of the MIT License.
// Permission is hereby granted, free of charge, to any person obtaining a *
// copy of this software and associated documentation files (the "Software"), * Author:
// to deal in the Software without restriction, including without limitation * Christopher ML Zumwalt May ([email protected])
// the rights to use, copy, modify, merge, publish, distribute, sublicense, */
// and/or sell copies of the Software, and to permit persons to whom the
// Software is furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
// DEALINGS IN THE SOFTWARE.
//
// File Name: FileGameSound.h
// Author: Christopher ML Zumwalt May ([email protected])
// Description: BFileGameSound is a class that streams data out of a file.
//------------------------------------------------------------------------------
#ifndef _FILEGAMESOUND_H #ifndef _FILEGAMESOUND_H
#define _FILEGAMESOUND_H #define _FILEGAMESOUND_H
#include <StreamingGameSound.h> #include <StreamingGameSound.h>
struct entry_ref; struct entry_ref;
struct _gs_media_tracker; struct _gs_media_tracker;
struct _gs_ramp; struct _gs_ramp;
@@ -36,41 +19,78 @@ struct _gs_ramp;
class BFileGameSound : public BStreamingGameSound { class BFileGameSound : public BStreamingGameSound {
public: public:
BFileGameSound(const entry_ref * file, BFileGameSound(const entry_ref* file,
bool looping = true, bool looping = true,
BGameSoundDevice * device = NULL); BGameSoundDevice* device = NULL);
BFileGameSound(const char * file, BFileGameSound(const char* file,
bool looping = true, bool looping = true,
BGameSoundDevice * device = NULL); BGameSoundDevice* device = NULL);
virtual ~BFileGameSound(); virtual ~BFileGameSound();
virtual BGameSound * Clone() const; virtual BGameSound* Clone() const;
virtual status_t StartPlaying(); virtual status_t StartPlaying();
virtual status_t StopPlaying(); virtual status_t StopPlaying();
status_t Preload(); // if you have stopped and want to start quickly again status_t Preload();
// if you have stopped and want to start quickly again
virtual void FillBuffer(void* buffer, size_t byteCount);
virtual status_t Perform(int32 selector, void* data);
virtual status_t SetPaused(bool isPaused, bigtime_t rampTime);
virtual void FillBuffer(void * inBuffer,
size_t inByteCount);
virtual status_t Perform(int32 selector, void * data);
virtual status_t SetPaused(bool isPaused,
bigtime_t rampTime);
enum { enum {
B_NOT_PAUSED, B_NOT_PAUSED,
B_PAUSE_IN_PROGRESS, B_PAUSE_IN_PROGRESS,
B_PAUSED B_PAUSED
}; };
int32 IsPaused(); int32 IsPaused();
private: private:
_gs_media_tracker * fAudioStream; BFileGameSound();
BFileGameSound(const BFileGameSound& other);
BFileGameSound& operator=(const BFileGameSound& other);
// not implemented
status_t Init(const entry_ref* file);
bool Load();
bool Read(void* buffer, size_t bytes);
status_t _Reserved_BFileGameSound_0(int32 arg, ...);
// SetPaused(bool paused, bigtime_t ramp);
virtual status_t _Reserved_BFileGameSound_1(int32 arg, ...);
virtual status_t _Reserved_BFileGameSound_2(int32 arg, ...);
virtual status_t _Reserved_BFileGameSound_3(int32 arg, ...);
virtual status_t _Reserved_BFileGameSound_4(int32 arg, ...);
virtual status_t _Reserved_BFileGameSound_5(int32 arg, ...);
virtual status_t _Reserved_BFileGameSound_6(int32 arg, ...);
virtual status_t _Reserved_BFileGameSound_7(int32 arg, ...);
virtual status_t _Reserved_BFileGameSound_8(int32 arg, ...);
virtual status_t _Reserved_BFileGameSound_9(int32 arg, ...);
virtual status_t _Reserved_BFileGameSound_10(int32 arg, ...);
virtual status_t _Reserved_BFileGameSound_11(int32 arg, ...);
virtual status_t _Reserved_BFileGameSound_12(int32 arg, ...);
virtual status_t _Reserved_BFileGameSound_13(int32 arg, ...);
virtual status_t _Reserved_BFileGameSound_14(int32 arg, ...);
virtual status_t _Reserved_BFileGameSound_15(int32 arg, ...);
virtual status_t _Reserved_BFileGameSound_16(int32 arg, ...);
virtual status_t _Reserved_BFileGameSound_17(int32 arg, ...);
virtual status_t _Reserved_BFileGameSound_18(int32 arg, ...);
virtual status_t _Reserved_BFileGameSound_19(int32 arg, ...);
virtual status_t _Reserved_BFileGameSound_20(int32 arg, ...);
virtual status_t _Reserved_BFileGameSound_21(int32 arg, ...);
virtual status_t _Reserved_BFileGameSound_22(int32 arg, ...);
virtual status_t _Reserved_BFileGameSound_23(int32 arg, ...);
private:
_gs_media_tracker* fAudioStream;
bool fStopping; bool fStopping;
bool fLooping; bool fLooping;
char fReserved; char fReserved;
char * fBuffer; char* fBuffer;
size_t fFrameSize; size_t fFrameSize;
size_t fBufferSize; size_t fBufferSize;
size_t fPlayPosition; size_t fPlayPosition;
@@ -78,48 +98,13 @@ private:
thread_id fReadThread; thread_id fReadThread;
port_id fPort; port_id fPort;
_gs_ramp * fPausing; _gs_ramp* fPausing;
bool fPaused; bool fPaused;
float fPauseGain; float fPauseGain;
status_t Init(const entry_ref* file);
bool Load();
bool Read(void * buffer, size_t bytes);
/* leave these declarations private unless you plan on actually implementing and using them. */ uint32 _reserved[9];
BFileGameSound();
BFileGameSound(const BFileGameSound&);
BFileGameSound& operator=(const BFileGameSound&);
/* fbc data and virtuals */
uint32 _reserved_BFileGameSound_[9];
status_t _Reserved_BFileGameSound_0(int32 arg, ...); /* SetPaused(bool paused, bigtime_t ramp); */
virtual status_t _Reserved_BFileGameSound_1(int32 arg, ...);
virtual status_t _Reserved_BFileGameSound_2(int32 arg, ...);
virtual status_t _Reserved_BFileGameSound_3(int32 arg, ...);
virtual status_t _Reserved_BFileGameSound_4(int32 arg, ...);
virtual status_t _Reserved_BFileGameSound_5(int32 arg, ...);
virtual status_t _Reserved_BFileGameSound_6(int32 arg, ...);
virtual status_t _Reserved_BFileGameSound_7(int32 arg, ...);
virtual status_t _Reserved_BFileGameSound_8(int32 arg, ...);
virtual status_t _Reserved_BFileGameSound_9(int32 arg, ...);
virtual status_t _Reserved_BFileGameSound_10(int32 arg, ...);
virtual status_t _Reserved_BFileGameSound_11(int32 arg, ...);
virtual status_t _Reserved_BFileGameSound_12(int32 arg, ...);
virtual status_t _Reserved_BFileGameSound_13(int32 arg, ...);
virtual status_t _Reserved_BFileGameSound_14(int32 arg, ...);
virtual status_t _Reserved_BFileGameSound_15(int32 arg, ...);
virtual status_t _Reserved_BFileGameSound_16(int32 arg, ...);
virtual status_t _Reserved_BFileGameSound_17(int32 arg, ...);
virtual status_t _Reserved_BFileGameSound_18(int32 arg, ...);
virtual status_t _Reserved_BFileGameSound_19(int32 arg, ...);
virtual status_t _Reserved_BFileGameSound_20(int32 arg, ...);
virtual status_t _Reserved_BFileGameSound_21(int32 arg, ...);
virtual status_t _Reserved_BFileGameSound_22(int32 arg, ...);
virtual status_t _Reserved_BFileGameSound_23(int32 arg, ...);
}; };
#endif // _FILEGAMESOUND_H #endif // _FILEGAMESOUND_H
+111 -142
View File
@@ -1,168 +1,137 @@
//------------------------------------------------------------------------------ /*
// Copyright (c) 2001-2002, OpenBeOS * Copyright 2001-2002, Haiku Inc. All Rights Reserved.
// * Distributed under the terms of the MIT License.
// Permission is hereby granted, free of charge, to any person obtaining a *
// copy of this software and associated documentation files (the "Software"), * Author:
// to deal in the Software without restriction, including without limitation * Christopher ML Zumwalt May ([email protected])
// the rights to use, copy, modify, merge, publish, distribute, sublicense, */
// and/or sell copies of the Software, and to permit persons to whom the
// Software is furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
// DEALINGS IN THE SOFTWARE.
//
// File Name: GameSound.h
// Author: Christopher ML Zumwalt May ([email protected])
// Description: Base class for play sounds using the game kit
//------------------------------------------------------------------------------
#ifndef _GAMESOUND_H #ifndef _GAMESOUND_H
#define _GAMESOUND_H #define _GAMESOUND_H
// Standard Includes -----------------------------------------------------------
// System Includes -------------------------------------------------------------
#include <GameSoundDefs.h> #include <GameSoundDefs.h>
#include <new> #include <new>
// Project Includes ------------------------------------------------------------
// Local Includes --------------------------------------------------------------
// Local Defines ---------------------------------------------------------------
// Globals ---------------------------------------------------------------------
class BGameSoundDevice; class BGameSoundDevice;
// BGameSound class -------------------------------------------------------------
class BGameSound class BGameSound {
{
public: public:
BGameSound(BGameSoundDevice * device = NULL); BGameSound(BGameSoundDevice* device = NULL);
virtual ~BGameSound(); virtual ~BGameSound();
virtual BGameSound * Clone() const = 0; virtual BGameSound* Clone() const = 0;
status_t InitCheck() const; status_t InitCheck() const;
// BGameSound attributes
BGameSoundDevice * Device() const;
gs_id ID() const;
const gs_audio_format & Format() const; // only valid after Init()
// Playing sounds // BGameSound attributes
virtual status_t StartPlaying(); BGameSoundDevice* Device() const;
virtual bool IsPlaying(); gs_id ID() const;
virtual status_t StopPlaying(); const gs_audio_format& Format() const;
// only valid after Init()
// Playing sounds
// Modifing the playback virtual status_t StartPlaying();
status_t SetGain(float gain, virtual bool IsPlaying();
bigtime_t duration = 0); // ramp duration in seconds virtual status_t StopPlaying();
status_t SetPan(float pan,
bigtime_t duration = 0); // ramp duration in seconds
float Gain();
float Pan();
virtual status_t SetAttributes(gs_attribute * inAttributes, // Modifing the playback
size_t inAttributeCount); status_t SetGain(float gain, bigtime_t duration = 0);
virtual status_t GetAttributes(gs_attribute * outAttributes, // ramp duration in seconds
size_t inAttributeCount); status_t SetPan(float pan, bigtime_t duration = 0);
// ramp duration in seconds
void * operator new(size_t size); float Gain();
void * operator new(size_t size, float Pan();
const std::nothrow_t &) throw();
void operator delete(void * ptr); virtual status_t SetAttributes(gs_attribute* attributes,
#if !__MWERKS__ size_t attributeCount);
// there's a bug in MWCC under R4.1 and earlier virtual status_t GetAttributes(gs_attribute* attributes,
void operator delete(void * ptr, size_t attributeCount);
const std::nothrow_t &) throw();
#endif void* operator new(size_t size);
void* operator new(size_t size,
const std::nothrow_t&) throw();
void operator delete(void* ptr);
void operator delete(void* ptr,
const std::nothrow_t&) throw();
static status_t SetMemoryPoolSize(size_t poolSize);
static status_t LockMemoryPool(bool lockInCore);
static int32 SetMaxSoundCount(int32 maxCount);
virtual status_t Perform(int32 selector, void* data);
static status_t SetMemoryPoolSize(size_t in_poolSize);
static status_t LockMemoryPool(bool in_lockInCore);
static int32 SetMaxSoundCount(int32 in_maxCount);
virtual status_t Perform(int32 selector, void * data);
protected: protected:
status_t SetInitError(status_t initError);
status_t Init(gs_id handle);
status_t SetInitError(status_t in_initError); BGameSound(const BGameSound& other);
status_t Init(gs_id handle); BGameSound& operator=(const BGameSound& other);
BGameSound(const BGameSound & other);
BGameSound & operator=(const BGameSound & other);
private: private:
BGameSoundDevice* fDevice; BGameSound();
status_t fInitError; // not implemented
virtual status_t _Reserved_BGameSound_0(int32 arg, ...);
virtual status_t _Reserved_BGameSound_1(int32 arg, ...);
virtual status_t _Reserved_BGameSound_2(int32 arg, ...);
virtual status_t _Reserved_BGameSound_3(int32 arg, ...);
virtual status_t _Reserved_BGameSound_4(int32 arg, ...);
virtual status_t _Reserved_BGameSound_5(int32 arg, ...);
virtual status_t _Reserved_BGameSound_6(int32 arg, ...);
virtual status_t _Reserved_BGameSound_7(int32 arg, ...);
virtual status_t _Reserved_BGameSound_8(int32 arg, ...);
virtual status_t _Reserved_BGameSound_9(int32 arg, ...);
virtual status_t _Reserved_BGameSound_10(int32 arg, ...);
virtual status_t _Reserved_BGameSound_11(int32 arg, ...);
virtual status_t _Reserved_BGameSound_12(int32 arg, ...);
virtual status_t _Reserved_BGameSound_13(int32 arg, ...);
virtual status_t _Reserved_BGameSound_14(int32 arg, ...);
virtual status_t _Reserved_BGameSound_15(int32 arg, ...);
virtual status_t _Reserved_BGameSound_16(int32 arg, ...);
virtual status_t _Reserved_BGameSound_17(int32 arg, ...);
virtual status_t _Reserved_BGameSound_18(int32 arg, ...);
virtual status_t _Reserved_BGameSound_19(int32 arg, ...);
virtual status_t _Reserved_BGameSound_20(int32 arg, ...);
virtual status_t _Reserved_BGameSound_21(int32 arg, ...);
virtual status_t _Reserved_BGameSound_22(int32 arg, ...);
virtual status_t _Reserved_BGameSound_23(int32 arg, ...);
virtual status_t _Reserved_BGameSound_24(int32 arg, ...);
virtual status_t _Reserved_BGameSound_25(int32 arg, ...);
virtual status_t _Reserved_BGameSound_26(int32 arg, ...);
virtual status_t _Reserved_BGameSound_27(int32 arg, ...);
virtual status_t _Reserved_BGameSound_28(int32 arg, ...);
virtual status_t _Reserved_BGameSound_29(int32 arg, ...);
virtual status_t _Reserved_BGameSound_30(int32 arg, ...);
virtual status_t _Reserved_BGameSound_31(int32 arg, ...);
virtual status_t _Reserved_BGameSound_32(int32 arg, ...);
virtual status_t _Reserved_BGameSound_33(int32 arg, ...);
virtual status_t _Reserved_BGameSound_34(int32 arg, ...);
virtual status_t _Reserved_BGameSound_35(int32 arg, ...);
virtual status_t _Reserved_BGameSound_36(int32 arg, ...);
virtual status_t _Reserved_BGameSound_37(int32 arg, ...);
virtual status_t _Reserved_BGameSound_38(int32 arg, ...);
virtual status_t _Reserved_BGameSound_39(int32 arg, ...);
virtual status_t _Reserved_BGameSound_40(int32 arg, ...);
virtual status_t _Reserved_BGameSound_41(int32 arg, ...);
virtual status_t _Reserved_BGameSound_42(int32 arg, ...);
virtual status_t _Reserved_BGameSound_43(int32 arg, ...);
virtual status_t _Reserved_BGameSound_44(int32 arg, ...);
virtual status_t _Reserved_BGameSound_45(int32 arg, ...);
virtual status_t _Reserved_BGameSound_46(int32 arg, ...);
virtual status_t _Reserved_BGameSound_47(int32 arg, ...);
private:
BGameSoundDevice* fDevice;
status_t fInitError;
gs_audio_format fFormat; gs_audio_format fFormat;
gs_id fSound; gs_id fSound;
/* leave these declarations private unless you plan on actually implementing and using them. */
BGameSound();
/* fbc data and virtuals */
uint32 _reserved_BGameSound_[16];
virtual status_t _Reserved_BGameSound_0(int32 arg, ...);
virtual status_t _Reserved_BGameSound_1(int32 arg, ...);
virtual status_t _Reserved_BGameSound_2(int32 arg, ...);
virtual status_t _Reserved_BGameSound_3(int32 arg, ...);
virtual status_t _Reserved_BGameSound_4(int32 arg, ...);
virtual status_t _Reserved_BGameSound_5(int32 arg, ...);
virtual status_t _Reserved_BGameSound_6(int32 arg, ...);
virtual status_t _Reserved_BGameSound_7(int32 arg, ...);
virtual status_t _Reserved_BGameSound_8(int32 arg, ...);
virtual status_t _Reserved_BGameSound_9(int32 arg, ...);
virtual status_t _Reserved_BGameSound_10(int32 arg, ...);
virtual status_t _Reserved_BGameSound_11(int32 arg, ...);
virtual status_t _Reserved_BGameSound_12(int32 arg, ...);
virtual status_t _Reserved_BGameSound_13(int32 arg, ...);
virtual status_t _Reserved_BGameSound_14(int32 arg, ...);
virtual status_t _Reserved_BGameSound_15(int32 arg, ...);
virtual status_t _Reserved_BGameSound_16(int32 arg, ...);
virtual status_t _Reserved_BGameSound_17(int32 arg, ...);
virtual status_t _Reserved_BGameSound_18(int32 arg, ...);
virtual status_t _Reserved_BGameSound_19(int32 arg, ...);
virtual status_t _Reserved_BGameSound_20(int32 arg, ...);
virtual status_t _Reserved_BGameSound_21(int32 arg, ...);
virtual status_t _Reserved_BGameSound_22(int32 arg, ...);
virtual status_t _Reserved_BGameSound_23(int32 arg, ...);
virtual status_t _Reserved_BGameSound_24(int32 arg, ...);
virtual status_t _Reserved_BGameSound_25(int32 arg, ...);
virtual status_t _Reserved_BGameSound_26(int32 arg, ...);
virtual status_t _Reserved_BGameSound_27(int32 arg, ...);
virtual status_t _Reserved_BGameSound_28(int32 arg, ...);
virtual status_t _Reserved_BGameSound_29(int32 arg, ...);
virtual status_t _Reserved_BGameSound_30(int32 arg, ...);
virtual status_t _Reserved_BGameSound_31(int32 arg, ...);
virtual status_t _Reserved_BGameSound_32(int32 arg, ...);
virtual status_t _Reserved_BGameSound_33(int32 arg, ...);
virtual status_t _Reserved_BGameSound_34(int32 arg, ...);
virtual status_t _Reserved_BGameSound_35(int32 arg, ...);
virtual status_t _Reserved_BGameSound_36(int32 arg, ...);
virtual status_t _Reserved_BGameSound_37(int32 arg, ...);
virtual status_t _Reserved_BGameSound_38(int32 arg, ...);
virtual status_t _Reserved_BGameSound_39(int32 arg, ...);
virtual status_t _Reserved_BGameSound_40(int32 arg, ...);
virtual status_t _Reserved_BGameSound_41(int32 arg, ...);
virtual status_t _Reserved_BGameSound_42(int32 arg, ...);
virtual status_t _Reserved_BGameSound_43(int32 arg, ...);
virtual status_t _Reserved_BGameSound_44(int32 arg, ...);
virtual status_t _Reserved_BGameSound_45(int32 arg, ...);
virtual status_t _Reserved_BGameSound_46(int32 arg, ...);
virtual status_t _Reserved_BGameSound_47(int32 arg, ...);
uint32 _reserved[16];
}; };
#endif // _GAME_SOUND_H #endif // _GAME_SOUND_H
+46 -62
View File
@@ -1,48 +1,30 @@
//------------------------------------------------------------------------------ /*
// Copyright (c) 2001-2002, OpenBeOS * Copyright 2001-2002, Haiku Inc. All Rights Reserved.
// * Distributed under the terms of the MIT License.
// Permission is hereby granted, free of charge, to any person obtaining a *
// copy of this software and associated documentation files (the "Software"), * Author:
// to deal in the Software without restriction, including without limitation * Christopher ML Zumwalt May ([email protected])
// the rights to use, copy, modify, merge, publish, distribute, sublicense, */
// and/or sell copies of the Software, and to permit persons to whom the #ifndef _GAME_SOUND_DEFS_H
// Software is furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
// DEALINGS IN THE SOFTWARE.
//
// File Name: GameSound.cpp
// Author: Christopher ML Zumwalt May ([email protected])
// Description: Declarations for game sounds
//------------------------------------------------------------------------------
#if !defined(_GAME_SOUND_DEFS_H)
#define _GAME_SOUND_DEFS_H #define _GAME_SOUND_DEFS_H
#include <SupportDefs.h> #include <SupportDefs.h>
typedef int32 gs_id; typedef int32 gs_id;
#define B_GS_CUR_API_VERSION B_BEOS_VERSION #define B_GS_CUR_API_VERSION B_BEOS_VERSION
#define B_GS_MIN_API_VERSION 0x100 #define B_GS_MIN_API_VERSION 0x100
// invalid sound handle // invalid sound handle
#define B_GS_INVALID_SOUND ((gs_id)-1) #define B_GS_INVALID_SOUND ((gs_id)-1)
// gs_id for the main mix buffer // gs_id for the main mix buffer
#define B_GS_MAIN_SOUND ((gs_id)-2) #define B_GS_MAIN_SOUND ((gs_id)-2)
enum //fixme renumber to real error messages enum {
{
B_GS_BAD_HANDLE = -99999, B_GS_BAD_HANDLE = -99999,
B_GS_NO_SOUNDS, B_GS_NO_SOUNDS,
B_GS_NO_HARDWARE, B_GS_NO_HARDWARE,
@@ -51,45 +33,47 @@ enum //fixme renumber to real error messages
}; };
struct gs_audio_format struct gs_audio_format {
{ /* same as media_raw_audio_format */ // same as media_raw_audio_format
enum format { /* for "format" */ enum format { // for "format"
B_GS_U8 = 0x11, /* 128 == mid, 1 == bottom, 255 == top */ B_GS_U8 = 0x11, // 128 == mid, 1 == bottom, 255 == top
B_GS_S16 = 0x2, /* 0 == mid, -32767 == bottom, +32767 == top */ B_GS_S16 = 0x2, // 0 == mid, -32767 == bottom, +32767 == top
B_GS_F = 0x24, /* 0 == mid, -1.0 == bottom, 1.0 == top */ B_GS_F = 0x24, // 0 == mid, -1.0 == bottom, 1.0 == top
B_GS_S32 = 0x4 /* 0 == mid, 0x80000001 == bottom, 0x7fffffff == top */ B_GS_S32 = 0x4 // 0 == mid, 0x80000001 == bottom,
// 0x7fffffff == top
}; };
float frame_rate; float frame_rate;
uint32 channel_count; /* 1 or 2, mostly */ uint32 channel_count; // 1 or 2, mostly
uint32 format; /* for compressed formats, go to media_encoded_audio_format */ uint32 format; // for compressed formats, go to
uint32 byte_order; /* 2 for little endian, 1 for big endian */ // media_encoded_audio_format
size_t buffer_size; /* size of each buffer -- NOT GUARANTEED */ uint32 byte_order; // 2 for little endian, 1 for big endian
size_t buffer_size; // size of each buffer -- NOT GUARANTEED
}; };
// enum gs_attributes {
enum gs_attributes B_GS_NO_ATTRIBUTE = 0, // when there is no attribute
{ B_GS_MAIN_GAIN = 1, // 0 == 0 dB, -6.0 == -6 dB (gs_id ignored)
B_GS_NO_ATTRIBUTE = 0, // when there is no attribute B_GS_CD_THROUGH_GAIN, // 0 == 0 dB, -12.0 == -12 dB (gs_id ignored)
B_GS_MAIN_GAIN = 1, // 0 == 0 dB, -6.0 == -6 dB (gs_id ignored) // but which CD?
B_GS_CD_THROUGH_GAIN, // 0 == 0 dB, -12.0 == -12 dB (gs_id ignored) B_GS_GAIN = 128, // 0 == 0 dB, -1.0 == -1 dB, +10.0 == +10 dB
// but which CD? B_GS_PAN, // 0 == middle, -1.0 == left, +1.0 == right
B_GS_GAIN = 128, // 0 == 0 dB, -1.0 == -1 dB, +10.0 == +10 dB B_GS_SAMPLING_RATE, // 44100.0 == 44.1 kHz
B_GS_PAN, // 0 == middle, -1.0 == left, +1.0 == right B_GS_LOOPING, // 0 == no
B_GS_SAMPLING_RATE, // 44100.0 == 44.1 kHz
B_GS_LOOPING, // 0 == no
B_GS_FIRST_PRIVATE_ATTRIBUTE = 90000, B_GS_FIRST_PRIVATE_ATTRIBUTE = 90000,
B_GS_FIRST_USER_ATTRIBUTE = 100000 B_GS_FIRST_USER_ATTRIBUTE = 100000
}; };
struct gs_attribute
{
int32 attribute; // which attribute struct gs_attribute {
bigtime_t duration; // how long of time to ramp over for the change int32 attribute; // which attribute
float value; // where the value stops changing bigtime_t duration; // how long of time to ramp over for the change
uint32 flags; // whatever flags are for the attribute float value; // where the value stops changing
uint32 flags; // whatever flags are for the attribute
}; };
struct gs_attribute_info
{
struct gs_attribute_info {
int32 attribute; int32 attribute;
float granularity; float granularity;
float minimum; float minimum;
@@ -97,4 +81,4 @@ struct gs_attribute_info
}; };
#endif // _GAME_SOUND_DEFS_H #endif // _GAME_SOUND_DEFS_H
+77 -100
View File
@@ -1,128 +1,105 @@
//------------------------------------------------------------------------------ /*
// Copyright (c) 2001-2002, OpenBeOS * Copyright 2001-2002, Haiku Inc. All Rights Reserved.
// * Distributed under the terms of the MIT License.
// Permission is hereby granted, free of charge, to any person obtaining a *
// copy of this software and associated documentation files (the "Software"), * Author:
// to deal in the Software without restriction, including without limitation * Christopher ML Zumwalt May ([email protected])
// the rights to use, copy, modify, merge, publish, distribute, sublicense, */
// and/or sell copies of the Software, and to permit persons to whom the
// Software is furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
// DEALINGS IN THE SOFTWARE.
//
// File Name: FileGameSound.h
// Author: Christopher ML Zumwalt May ([email protected])
// Description: BFileGameSound is a class that streams data out of a file.
//------------------------------------------------------------------------------
#ifndef _PUSHGAMESOUND_H #ifndef _PUSHGAMESOUND_H
#define _PUSHGAMESOUND_H #define _PUSHGAMESOUND_H
#include <StreamingGameSound.h> #include <StreamingGameSound.h>
class BPushGameSound : public BStreamingGameSound class BPushGameSound : public BStreamingGameSound {
{
public: public:
BPushGameSound(size_t inBufferFrameCount, BPushGameSound(size_t inBufferFrameCount,
const gs_audio_format * format, const gs_audio_format* format,
size_t inBufferCount = 2, size_t inBufferCount = 2,
BGameSoundDevice * device = NULL); BGameSoundDevice* device = NULL);
virtual ~BPushGameSound(); virtual ~BPushGameSound();
enum lock_status { enum lock_status {
lock_failed = -1, // not yet time to do more lock_failed = -1, // not yet time to do more
lock_ok = 0, // do more lock_ok = 0, // do more
lock_ok_frames_dropped // you may have missed some buffers lock_ok_frames_dropped // you may have missed some buffers
}; };
virtual lock_status LockNextPage(void ** out_pagePtr, virtual lock_status LockNextPage(void** _pagePtr,
size_t * out_pageSize); size_t* _pageSize);
virtual status_t UnlockPage(void * in_pagePtr); virtual status_t UnlockPage(void* pagePtr);
virtual lock_status LockForCyclic(void ** out_basePtr, virtual lock_status LockForCyclic(void** _basePtr, size_t* _size);
size_t * out_size); virtual status_t UnlockCyclic();
virtual status_t UnlockCyclic(); virtual size_t CurrentPosition();
virtual size_t CurrentPosition();
virtual BGameSound * Clone() const; virtual BGameSound* Clone() const;
virtual status_t Perform(int32 selector, void * data); virtual status_t Perform(int32 selector, void* data);
protected: protected:
BPushGameSound(BGameSoundDevice* device);
BPushGameSound(BGameSoundDevice * device);
virtual status_t SetParameters(size_t inBufferFrameCount, virtual status_t SetParameters(size_t bufferFrameCount,
const gs_audio_format * format, const gs_audio_format* format,
size_t inBufferCount); size_t bufferCount);
virtual status_t SetStreamHook(void (*hook)(void * inCookie, void * inBuffer, size_t inByteCount, BStreamingGameSound * me), virtual status_t SetStreamHook(void (*hook)(void* inCookie,
void * cookie); void* buffer, size_t byteCount,
BStreamingGameSound* me),
virtual void FillBuffer(void * inBuffer, void* cookie);
size_t inByteCount);
virtual void FillBuffer(void* buffer, size_t byteCount);
private: private:
BPushGameSound();
BPushGameSound(const BPushGameSound& other);
BPushGameSound& operator=(const BPushGameSound& other);
// not implemented
/* leave these declarations private unless you plan on actually implementing and using them. */ bool BytesReady(size_t* bytes);
BPushGameSound();
BPushGameSound(const BPushGameSound&);
BPushGameSound& operator=(const BPushGameSound&);
bool BytesReady(size_t * bytes); virtual status_t _Reserved_BPushGameSound_0(int32 arg, ...);
virtual status_t _Reserved_BPushGameSound_1(int32 arg, ...);
virtual status_t _Reserved_BPushGameSound_2(int32 arg, ...);
virtual status_t _Reserved_BPushGameSound_3(int32 arg, ...);
virtual status_t _Reserved_BPushGameSound_4(int32 arg, ...);
virtual status_t _Reserved_BPushGameSound_5(int32 arg, ...);
virtual status_t _Reserved_BPushGameSound_6(int32 arg, ...);
virtual status_t _Reserved_BPushGameSound_7(int32 arg, ...);
virtual status_t _Reserved_BPushGameSound_8(int32 arg, ...);
virtual status_t _Reserved_BPushGameSound_9(int32 arg, ...);
virtual status_t _Reserved_BPushGameSound_10(int32 arg, ...);
virtual status_t _Reserved_BPushGameSound_11(int32 arg, ...);
virtual status_t _Reserved_BPushGameSound_12(int32 arg, ...);
virtual status_t _Reserved_BPushGameSound_13(int32 arg, ...);
virtual status_t _Reserved_BPushGameSound_14(int32 arg, ...);
virtual status_t _Reserved_BPushGameSound_15(int32 arg, ...);
virtual status_t _Reserved_BPushGameSound_16(int32 arg, ...);
virtual status_t _Reserved_BPushGameSound_17(int32 arg, ...);
virtual status_t _Reserved_BPushGameSound_18(int32 arg, ...);
virtual status_t _Reserved_BPushGameSound_19(int32 arg, ...);
virtual status_t _Reserved_BPushGameSound_20(int32 arg, ...);
virtual status_t _Reserved_BPushGameSound_21(int32 arg, ...);
virtual status_t _Reserved_BPushGameSound_22(int32 arg, ...);
virtual status_t _Reserved_BPushGameSound_23(int32 arg, ...);
private:
sem_id fLock;
BList* fPageLocked;
sem_id fLock; size_t fLockPos;
BList * fPageLocked; size_t fPlayPos;
size_t fLockPos; char* fBuffer;
size_t fPlayPos; size_t fPageSize;
int32 fPageCount;
char * fBuffer; size_t fBufferSize;
size_t fPageSize;
int32 fPageCount;
size_t fBufferSize;
/* fbc data and virtuals */
uint32 _reserved_BPushGameSound_[12];
virtual status_t _Reserved_BPushGameSound_0(int32 arg, ...);
virtual status_t _Reserved_BPushGameSound_1(int32 arg, ...);
virtual status_t _Reserved_BPushGameSound_2(int32 arg, ...);
virtual status_t _Reserved_BPushGameSound_3(int32 arg, ...);
virtual status_t _Reserved_BPushGameSound_4(int32 arg, ...);
virtual status_t _Reserved_BPushGameSound_5(int32 arg, ...);
virtual status_t _Reserved_BPushGameSound_6(int32 arg, ...);
virtual status_t _Reserved_BPushGameSound_7(int32 arg, ...);
virtual status_t _Reserved_BPushGameSound_8(int32 arg, ...);
virtual status_t _Reserved_BPushGameSound_9(int32 arg, ...);
virtual status_t _Reserved_BPushGameSound_10(int32 arg, ...);
virtual status_t _Reserved_BPushGameSound_11(int32 arg, ...);
virtual status_t _Reserved_BPushGameSound_12(int32 arg, ...);
virtual status_t _Reserved_BPushGameSound_13(int32 arg, ...);
virtual status_t _Reserved_BPushGameSound_14(int32 arg, ...);
virtual status_t _Reserved_BPushGameSound_15(int32 arg, ...);
virtual status_t _Reserved_BPushGameSound_16(int32 arg, ...);
virtual status_t _Reserved_BPushGameSound_17(int32 arg, ...);
virtual status_t _Reserved_BPushGameSound_18(int32 arg, ...);
virtual status_t _Reserved_BPushGameSound_19(int32 arg, ...);
virtual status_t _Reserved_BPushGameSound_20(int32 arg, ...);
virtual status_t _Reserved_BPushGameSound_21(int32 arg, ...);
virtual status_t _Reserved_BPushGameSound_22(int32 arg, ...);
virtual status_t _Reserved_BPushGameSound_23(int32 arg, ...);
uint32 _reserved[12];
}; };
#endif // _PUSH_GAME_SOUND_H #endif // _PUSH_GAME_SOUND_H
+49 -51
View File
@@ -1,5 +1,5 @@
/* /*
* Copyright 2001-2008, Haiku Inc. All Rights Reserved. * Copyright 2001-2010, Haiku Inc. All Rights Reserved.
* Distributed under the terms of the MIT License. * Distributed under the terms of the MIT License.
*/ */
#ifndef _SIMPLEGAMESOUND_H #ifndef _SIMPLEGAMESOUND_H
@@ -15,64 +15,62 @@ struct entry_ref;
class BSimpleGameSound : public BGameSound { class BSimpleGameSound : public BGameSound {
public: public:
BSimpleGameSound(const entry_ref * inFile, BSimpleGameSound(const entry_ref* file,
BGameSoundDevice * device = NULL); BGameSoundDevice* device = NULL);
BSimpleGameSound(const char * inFile, BSimpleGameSound(const char* file,
BGameSoundDevice * device = NULL); BGameSoundDevice* device = NULL);
BSimpleGameSound(const void * inData, BSimpleGameSound(const void* data,
size_t inFrameCount, size_t frameCount,
const gs_audio_format * format, const gs_audio_format* format,
BGameSoundDevice * device = NULL); BGameSoundDevice* device = NULL);
BSimpleGameSound(const BSimpleGameSound & other); BSimpleGameSound(const BSimpleGameSound& other);
virtual ~BSimpleGameSound(); virtual ~BSimpleGameSound();
virtual BGameSound * Clone() const; virtual BGameSound* Clone() const;
virtual status_t Perform(int32 selector, void * data); virtual status_t Perform(int32 selector, void* data);
status_t SetIsLooping(bool looping); status_t SetIsLooping(bool looping);
bool IsLooping() const; bool IsLooping() const;
private: private:
status_t Init(const entry_ref * inFile); BSimpleGameSound();
status_t Init(const void* inData, int64 inFrameCount, BSimpleGameSound& operator=(const BSimpleGameSound& other);
const gs_audio_format* format); // not implemented
/* leave these declarations private unless you plan on actually implementing and using them. */
BSimpleGameSound();
BSimpleGameSound& operator=(const BSimpleGameSound&);
/* fbc data and virtuals */ status_t Init(const entry_ref* file);
status_t Init(const void* data, int64 frameCount,
const gs_audio_format* format);
uint32 _reserved_BSimpleGameSound_[12]; virtual status_t _Reserved_BSimpleGameSound_0(int32 arg, ...);
virtual status_t _Reserved_BSimpleGameSound_1(int32 arg, ...);
virtual status_t _Reserved_BSimpleGameSound_0(int32 arg, ...); virtual status_t _Reserved_BSimpleGameSound_2(int32 arg, ...);
virtual status_t _Reserved_BSimpleGameSound_1(int32 arg, ...); virtual status_t _Reserved_BSimpleGameSound_3(int32 arg, ...);
virtual status_t _Reserved_BSimpleGameSound_2(int32 arg, ...); virtual status_t _Reserved_BSimpleGameSound_4(int32 arg, ...);
virtual status_t _Reserved_BSimpleGameSound_3(int32 arg, ...); virtual status_t _Reserved_BSimpleGameSound_5(int32 arg, ...);
virtual status_t _Reserved_BSimpleGameSound_4(int32 arg, ...); virtual status_t _Reserved_BSimpleGameSound_6(int32 arg, ...);
virtual status_t _Reserved_BSimpleGameSound_5(int32 arg, ...); virtual status_t _Reserved_BSimpleGameSound_7(int32 arg, ...);
virtual status_t _Reserved_BSimpleGameSound_6(int32 arg, ...); virtual status_t _Reserved_BSimpleGameSound_8(int32 arg, ...);
virtual status_t _Reserved_BSimpleGameSound_7(int32 arg, ...); virtual status_t _Reserved_BSimpleGameSound_9(int32 arg, ...);
virtual status_t _Reserved_BSimpleGameSound_8(int32 arg, ...); virtual status_t _Reserved_BSimpleGameSound_10(int32 arg, ...);
virtual status_t _Reserved_BSimpleGameSound_9(int32 arg, ...); virtual status_t _Reserved_BSimpleGameSound_11(int32 arg, ...);
virtual status_t _Reserved_BSimpleGameSound_10(int32 arg, ...); virtual status_t _Reserved_BSimpleGameSound_12(int32 arg, ...);
virtual status_t _Reserved_BSimpleGameSound_11(int32 arg, ...); virtual status_t _Reserved_BSimpleGameSound_13(int32 arg, ...);
virtual status_t _Reserved_BSimpleGameSound_12(int32 arg, ...); virtual status_t _Reserved_BSimpleGameSound_14(int32 arg, ...);
virtual status_t _Reserved_BSimpleGameSound_13(int32 arg, ...); virtual status_t _Reserved_BSimpleGameSound_15(int32 arg, ...);
virtual status_t _Reserved_BSimpleGameSound_14(int32 arg, ...); virtual status_t _Reserved_BSimpleGameSound_16(int32 arg, ...);
virtual status_t _Reserved_BSimpleGameSound_15(int32 arg, ...); virtual status_t _Reserved_BSimpleGameSound_17(int32 arg, ...);
virtual status_t _Reserved_BSimpleGameSound_16(int32 arg, ...); virtual status_t _Reserved_BSimpleGameSound_18(int32 arg, ...);
virtual status_t _Reserved_BSimpleGameSound_17(int32 arg, ...); virtual status_t _Reserved_BSimpleGameSound_19(int32 arg, ...);
virtual status_t _Reserved_BSimpleGameSound_18(int32 arg, ...); virtual status_t _Reserved_BSimpleGameSound_20(int32 arg, ...);
virtual status_t _Reserved_BSimpleGameSound_19(int32 arg, ...); virtual status_t _Reserved_BSimpleGameSound_21(int32 arg, ...);
virtual status_t _Reserved_BSimpleGameSound_20(int32 arg, ...); virtual status_t _Reserved_BSimpleGameSound_22(int32 arg, ...);
virtual status_t _Reserved_BSimpleGameSound_21(int32 arg, ...); virtual status_t _Reserved_BSimpleGameSound_23(int32 arg, ...);
virtual status_t _Reserved_BSimpleGameSound_22(int32 arg, ...);
virtual status_t _Reserved_BSimpleGameSound_23(int32 arg, ...);
private:
uint32 _reserved[12];
}; };
#endif // _SIMPLE_GAME_SOUND_H
#endif // _SIMPLE_GAME_SOUND_H
+66 -97
View File
@@ -1,122 +1,91 @@
//------------------------------------------------------------------------------ /*
// Copyright (c) 2001-2002, OpenBeOS * Copyright 2001-2002, Haiku Inc. All Rights Reserved.
// * Distributed under the terms of the MIT License.
// Permission is hereby granted, free of charge, to any person obtaining a *
// copy of this software and associated documentation files (the "Software"), * Author:
// to deal in the Software without restriction, including without limitation * Christopher ML Zumwalt May ([email protected])
// the rights to use, copy, modify, merge, publish, distribute, sublicense, */
// and/or sell copies of the Software, and to permit persons to whom the
// Software is furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
// DEALINGS IN THE SOFTWARE.
//
// File Name: StreamingGameSound.h
// Author: Christopher ML Zumwalt May ([email protected])
// Description: BStreamingGameSound is a class for all kinds of streaming
// (data not known beforehand) game sounds.
//------------------------------------------------------------------------------
#ifndef _STREAMINGGAMESOUND_H #ifndef _STREAMINGGAMESOUND_H
#define _STREAMINGGAMESOUND_H #define _STREAMINGGAMESOUND_H
// Standard Includes -----------------------------------------------------------
// System Includes -------------------------------------------------------------
#include <SupportDefs.h> #include <SupportDefs.h>
#include <GameSound.h> #include <GameSound.h>
#include <Locker.h> #include <Locker.h>
// Project Includes ------------------------------------------------------------
// Local Includes -------------------------------------------------------------- class BStreamingGameSound : public BGameSound {
// Local Defines ---------------------------------------------------------------
// Globals ---------------------------------------------------------------------
class BStreamingGameSound : public BGameSound
{
public: public:
BStreamingGameSound(size_t inBufferFrameCount, BStreamingGameSound(size_t bufferFrameCount,
const gs_audio_format * format, const gs_audio_format* format,
size_t inBufferCount = 2, size_t bufferCount = 2,
BGameSoundDevice * device = NULL); BGameSoundDevice* device = NULL);
virtual ~BStreamingGameSound(); virtual ~BStreamingGameSound();
virtual BGameSound * Clone() const; virtual BGameSound* Clone() const;
virtual status_t SetStreamHook(void (*hook)(void * inCookie, void * inBuffer, size_t inByteCount, BStreamingGameSound * me), virtual status_t SetStreamHook(void (*hook)(void* cookie,
void * cookie); void* buffer, size_t byteCount,
virtual void FillBuffer(void * inBuffer, BStreamingGameSound* me),
size_t inByteCount); void* cookie);
virtual void FillBuffer(void* buffer, size_t byteCount);
virtual status_t SetAttributes(gs_attribute * inAttributes, virtual status_t SetAttributes(gs_attribute* attributes,
size_t inAttributeCount); size_t attributeCount);
virtual status_t Perform(int32 selector, void * data); virtual status_t Perform(int32 selector, void* data);
protected: protected:
BStreamingGameSound(BGameSoundDevice* device);
BStreamingGameSound(BGameSoundDevice * device); virtual status_t SetParameters(size_t bufferFrameCount,
const gs_audio_format* format,
virtual status_t SetParameters(size_t inBufferFrameCount, size_t bufferCount);
const gs_audio_format * format,
size_t inBufferCount); bool Lock();
void Unlock();
bool Lock();
void Unlock();
private: private:
BStreamingGameSound();
BStreamingGameSound(
const BStreamingGameSound& other);
BStreamingGameSound& operator=(const BStreamingGameSound& other);
// not implemented
void (*fStreamHook)(void * cookie, void * buffer, size_t bytes, BStreamingGameSound * sound); virtual status_t _Reserved_BStreamingGameSound_0(int32 arg,...);
void * fStreamCookie; virtual status_t _Reserved_BStreamingGameSound_1(int32 arg,...);
BLocker fLock; virtual status_t _Reserved_BStreamingGameSound_2(int32 arg,...);
virtual status_t _Reserved_BStreamingGameSound_3(int32 arg,...);
virtual status_t _Reserved_BStreamingGameSound_4(int32 arg,...);
virtual status_t _Reserved_BStreamingGameSound_5(int32 arg,...);
virtual status_t _Reserved_BStreamingGameSound_6(int32 arg,...);
virtual status_t _Reserved_BStreamingGameSound_7(int32 arg,...);
virtual status_t _Reserved_BStreamingGameSound_8(int32 arg,...);
virtual status_t _Reserved_BStreamingGameSound_9(int32 arg,...);
virtual status_t _Reserved_BStreamingGameSound_10(int32 arg,...);
virtual status_t _Reserved_BStreamingGameSound_11(int32 arg,...);
virtual status_t _Reserved_BStreamingGameSound_12(int32 arg,...);
virtual status_t _Reserved_BStreamingGameSound_13(int32 arg,...);
virtual status_t _Reserved_BStreamingGameSound_14(int32 arg,...);
virtual status_t _Reserved_BStreamingGameSound_15(int32 arg,...);
virtual status_t _Reserved_BStreamingGameSound_16(int32 arg,...);
virtual status_t _Reserved_BStreamingGameSound_17(int32 arg,...);
virtual status_t _Reserved_BStreamingGameSound_18(int32 arg,...);
virtual status_t _Reserved_BStreamingGameSound_19(int32 arg,...);
virtual status_t _Reserved_BStreamingGameSound_20(int32 arg,...);
virtual status_t _Reserved_BStreamingGameSound_21(int32 arg,...);
virtual status_t _Reserved_BStreamingGameSound_22(int32 arg,...);
virtual status_t _Reserved_BStreamingGameSound_23(int32 arg,...);
/* leave these declarations private unless you plan on actually implementing and using them. */ private:
BStreamingGameSound(); void (*fStreamHook)(void* cookie, void* buffer,
BStreamingGameSound(const BStreamingGameSound&); size_t bytes, BStreamingGameSound* sound);
BStreamingGameSound& operator=(const BStreamingGameSound&); void* fStreamCookie;
BLocker fLock;
/* fbc data and virtuals */
uint32 _reserved_BStreamingGameSound_[12];
virtual status_t _Reserved_BStreamingGameSound_0(int32 arg, ...);
virtual status_t _Reserved_BStreamingGameSound_1(int32 arg, ...);
virtual status_t _Reserved_BStreamingGameSound_2(int32 arg, ...);
virtual status_t _Reserved_BStreamingGameSound_3(int32 arg, ...);
virtual status_t _Reserved_BStreamingGameSound_4(int32 arg, ...);
virtual status_t _Reserved_BStreamingGameSound_5(int32 arg, ...);
virtual status_t _Reserved_BStreamingGameSound_6(int32 arg, ...);
virtual status_t _Reserved_BStreamingGameSound_7(int32 arg, ...);
virtual status_t _Reserved_BStreamingGameSound_8(int32 arg, ...);
virtual status_t _Reserved_BStreamingGameSound_9(int32 arg, ...);
virtual status_t _Reserved_BStreamingGameSound_10(int32 arg, ...);
virtual status_t _Reserved_BStreamingGameSound_11(int32 arg, ...);
virtual status_t _Reserved_BStreamingGameSound_12(int32 arg, ...);
virtual status_t _Reserved_BStreamingGameSound_13(int32 arg, ...);
virtual status_t _Reserved_BStreamingGameSound_14(int32 arg, ...);
virtual status_t _Reserved_BStreamingGameSound_15(int32 arg, ...);
virtual status_t _Reserved_BStreamingGameSound_16(int32 arg, ...);
virtual status_t _Reserved_BStreamingGameSound_17(int32 arg, ...);
virtual status_t _Reserved_BStreamingGameSound_18(int32 arg, ...);
virtual status_t _Reserved_BStreamingGameSound_19(int32 arg, ...);
virtual status_t _Reserved_BStreamingGameSound_20(int32 arg, ...);
virtual status_t _Reserved_BStreamingGameSound_21(int32 arg, ...);
virtual status_t _Reserved_BStreamingGameSound_22(int32 arg, ...);
virtual status_t _Reserved_BStreamingGameSound_23(int32 arg, ...);
uint32 _reserved[12];
}; };
#endif // _STREAMING_GAME_SOUND_H
#endif // _STREAMING_GAME_SOUND_H
+28 -40
View File
@@ -1,61 +1,49 @@
//---------------------------------------------------------------------- /*
// This software is part of the OpenBeOS distribution and is covered * Copyright 2001-2010, Haiku Inc.
// by the OpenBeOS license. * Distributed under the terms of the MIT License.
//--------------------------------------------------------------------- */
/*!
\file EntryList.h
BEntryList interface declaration.
*/
#ifndef _ENTRY_LIST_H #ifndef _ENTRY_LIST_H
#define _ENTRY_LIST_H #define _ENTRY_LIST_H
#include <dirent.h> #include <dirent.h>
#include <SupportDefs.h> #include <SupportDefs.h>
#ifdef USE_OPENBEOS_NAMESPACE
namespace OpenBeOS {
#endif
// Forward declarations
class BEntry; class BEntry;
struct entry_ref; struct entry_ref;
//! Interface for iterating through a list of filesystem entries
/*! Defines a general interface for iterating through a list of entries (i.e. /*! Interface for iterating through a list of filesystem entries
Defines a general interface for iterating through a list of entries (i.e.
files in a folder files in a folder
@author <a href='mailto:[email protected]'>Tyler Dauwalder</a>
@author Be Inc.
@version 0.0.0
*/ */
class BEntryList { class BEntryList {
public: public:
BEntryList(); BEntryList();
virtual ~BEntryList(); virtual ~BEntryList();
virtual status_t GetNextEntry(BEntry *entry, bool traverse = false) = 0;
virtual status_t GetNextRef(entry_ref *ref) = 0;
virtual int32 GetNextDirents(struct dirent *buf, size_t length,
int32 count = INT_MAX) = 0;
virtual status_t Rewind() = 0;
virtual int32 CountEntries() = 0;
virtual status_t GetNextEntry(BEntry* entry,
bool traverse = false) = 0;
virtual status_t GetNextRef(entry_ref* ref) = 0;
virtual int32 GetNextDirents(struct dirent* direntBuffer,
size_t bufferSize,
int32 maxEntries = INT_MAX) = 0;
virtual status_t Rewind() = 0;
virtual int32 CountEntries() = 0;
private: private:
virtual void _ReservedEntryList1(); virtual void _ReservedEntryList1();
virtual void _ReservedEntryList2(); virtual void _ReservedEntryList2();
virtual void _ReservedEntryList3(); virtual void _ReservedEntryList3();
virtual void _ReservedEntryList4(); virtual void _ReservedEntryList4();
virtual void _ReservedEntryList5(); virtual void _ReservedEntryList5();
virtual void _ReservedEntryList6(); virtual void _ReservedEntryList6();
virtual void _ReservedEntryList7(); virtual void _ReservedEntryList7();
virtual void _ReservedEntryList8(); virtual void _ReservedEntryList8();
}; };
#ifdef USE_OPENBEOS_NAMESPACE
}; // namespace OpenBeOS
#endif
#endif // _ENTRY_LIST_H #endif // _ENTRY_LIST_H
+47 -59
View File
@@ -1,88 +1,76 @@
/* /*
* Copyright 2002-2006, Haiku, Inc. All Rights Reserved. * Copyright 2002-2010, Haiku, Inc. All Rights Reserved.
* Distributed under the terms of the MIT License. * Distributed under the terms of the MIT License.
*/ */
#ifndef _NODE_INFO_H #ifndef _NODE_INFO_H
#define _NODE_INFO_H #define _NODE_INFO_H
#ifndef _BE_BUILD_H
#include <BeBuild.h>
#endif
#include <SupportDefs.h>
#include <Mime.h>
#include <Message.h>
#include <File.h>
#include <Entry.h>
#ifdef USE_OPENBEOS_NAMESPACE #include <BeBuild.h>
namespace OpenBeOS { #include <Entry.h>
#endif // USE_OPENBEOS_NAMESPACE #include <File.h>
#include <Message.h>
#include <Mime.h>
#include <SupportDefs.h>
class BBitmap; class BBitmap;
class BResources; class BResources;
//! BNodeInfo provides file type information /*! \brief BNodeInfo provides file type information
/*! BNodeInfo provides a nice wrapper to all sorts of usefull meta data. BNodeInfo provides a nice wrapper to all sorts of usefull meta data.
Like it's mime type, the files icon and the application which will load Like it's mime type, the files icon and the application which will load
the file. the file.
*/
\see <a href="http://www.opensource.org/licenses/mit-license.html">MIT</a>
\author <a href='mailto:[email protected]'>Ingo Weinhold</a>
\author <a href="mailto:[email protected]"> Michael Lloyd Lee </a>
\author Be Inc
\version 0
*/
class BNodeInfo { class BNodeInfo {
public: public:
BNodeInfo();
BNodeInfo(BNode* node);
virtual ~BNodeInfo();
BNodeInfo(); status_t SetTo(BNode* node);
BNodeInfo(BNode *node); status_t InitCheck() const;
virtual ~BNodeInfo();
status_t SetTo(BNode *node); virtual status_t GetType(char* type) const;
virtual status_t SetType(const char* type);
virtual status_t GetIcon(BBitmap* icon,
icon_size size = B_LARGE_ICON) const;
virtual status_t SetIcon(const BBitmap* icon,
icon_size size = B_LARGE_ICON);
status_t GetIcon(uint8** data, size_t* size,
type_code* type) const;
status_t SetIcon(const uint8* data, size_t size);
status_t InitCheck() const; status_t GetPreferredApp(char* signature,
app_verb verb = B_OPEN) const;
status_t SetPreferredApp(const char* signature,
app_verb verb = B_OPEN);
status_t GetAppHint(entry_ref* ref) const;
status_t SetAppHint(const entry_ref* ref);
virtual status_t GetType(char *type) const; status_t GetTrackerIcon(BBitmap* icon,
virtual status_t SetType(const char *type); icon_size size = B_LARGE_ICON) const;
virtual status_t GetIcon(BBitmap *icon, icon_size k = B_LARGE_ICON) const; static status_t GetTrackerIcon(const entry_ref* ref,
virtual status_t SetIcon(const BBitmap *icon, icon_size k = B_LARGE_ICON); BBitmap* icon,
status_t GetIcon(uint8** data, size_t* size, type_code* type) const; icon_size size = B_LARGE_ICON);
status_t SetIcon(const uint8* data, size_t size);
status_t GetPreferredApp(char *signature,
app_verb verb = B_OPEN) const;
status_t SetPreferredApp(const char *signature,
app_verb verb = B_OPEN);
status_t GetAppHint(entry_ref *ref) const;
status_t SetAppHint(const entry_ref *ref);
status_t GetTrackerIcon(BBitmap *icon,
icon_size k = B_LARGE_ICON) const;
static status_t GetTrackerIcon(const entry_ref *ref,
BBitmap *icon,
icon_size k = B_LARGE_ICON);
private: private:
friend class BAppFileInfo; friend class BAppFileInfo;
virtual void _ReservedNodeInfo1(); //< FBC virtual void _ReservedNodeInfo1();
virtual void _ReservedNodeInfo2(); //< FBC virtual void _ReservedNodeInfo2();
virtual void _ReservedNodeInfo3(); //< FBC virtual void _ReservedNodeInfo3();
BNodeInfo &operator=(const BNodeInfo &); BNodeInfo &operator=(const BNodeInfo& other);
BNodeInfo(const BNodeInfo &); BNodeInfo(const BNodeInfo& other);
// not implemented
BNode *fNode; //< The Node in question private:
uint32 _reserved[2]; //< FBC BNode* fNode;
status_t fCStatus; //< The status to return from InitCheck uint32 _reserved[2];
status_t fCStatus;
}; };
#ifdef USE_OPENBEOS_NAMESPACE
}
#endif // USE_OPENBEOS_NAMESPACE
#endif // _NODE_INFO_H #endif // _NODE_INFO_H
+57 -63
View File
@@ -1,92 +1,86 @@
//---------------------------------------------------------------------- /*
// This software is part of the OpenBeOS distribution and is covered * Copyright 2001-2010, Haiku Inc.
// by the OpenBeOS license. * Distributed under the terms of the MIT License.
//--------------------------------------------------------------------- */
/*!
\file ResourceStrings.h
BResourceStrings interface declaration.
*/
#ifndef _RESOURCE_STRINGS_H #ifndef _RESOURCE_STRINGS_H
#define _RESOURCE_STRINGS_H #define _RESOURCE_STRINGS_H
#include <Entry.h> #include <Entry.h>
#include <Locker.h> #include <Locker.h>
class BResources; class BResources;
class BString; class BString;
/*!
\class BResourceStrings /*! \brief Simple class to access the string resources in a file.
\brief Simple class to access the string resources in a file.
A BResourceStrings object reads the string type resources from a given A BResourceStrings object reads the string type resources from a given
resource file and provides fast read only access to them. resource file and provides fast read only access to them.
\author <a href='mailto:[email protected]'>Ingo Weinhold</a>
\version 0.0.0
*/ */
class BResourceStrings { class BResourceStrings {
public: public:
BResourceStrings(); BResourceStrings();
BResourceStrings(const entry_ref &ref); BResourceStrings(const entry_ref& ref);
virtual ~BResourceStrings(); virtual ~BResourceStrings();
status_t InitCheck(); status_t InitCheck();
virtual BString *NewString(int32 id); virtual BString* NewString(int32 id);
virtual const char *FindString(int32 id); virtual const char* FindString(int32 id);
virtual status_t SetStringFile(const entry_ref *ref); virtual status_t SetStringFile(const entry_ref* ref);
status_t GetStringFile(entry_ref *outRef); status_t GetStringFile(entry_ref* outRef);
public: enum {
enum { RESOURCE_TYPE = 'CSTR'
RESOURCE_TYPE = 'CSTR' };
};
protected: protected:
struct _string_id_hash { struct _string_id_hash {
_string_id_hash(); _string_id_hash();
~_string_id_hash(); ~_string_id_hash();
void assign_string(const char *str, bool makeCopy);
_string_id_hash *next; void assign_string(const char* str, bool makeCopy);
int32 id;
char *data; _string_id_hash* next;
bool data_alloced; int32 id;
bool _reserved1[3]; char* data;
uint32 _reserved2; bool data_alloced;
}; bool _reserved1[3];
uint32 _reserved2;
};
private:
void _Cleanup();
void _MakeEmpty();
status_t _Rehash(int32 newSize);
_string_id_hash* _AddString(char* str, int32 id,
bool wasMalloced);
virtual _string_id_hash* _FindString(int32 id);
virtual status_t _Reserved_ResourceStrings_0(void*);
virtual status_t _Reserved_ResourceStrings_1(void*);
virtual status_t _Reserved_ResourceStrings_2(void*);
virtual status_t _Reserved_ResourceStrings_3(void*);
virtual status_t _Reserved_ResourceStrings_4(void*);
virtual status_t _Reserved_ResourceStrings_5(void*);
protected: protected:
BLocker _string_lock; BLocker _string_lock;
status_t _init_error; status_t _init_error;
private: private:
entry_ref fFileRef; entry_ref fFileRef;
BResources *fResources; BResources *fResources;
_string_id_hash **fHashTable; _string_id_hash **fHashTable;
int32 fHashTableSize; int32 fHashTableSize;
int32 fStringCount; int32 fStringCount;
uint32 _reserved[16]; // FBC uint32 _reserved[16]; // FBC
private:
void _Cleanup();
void _MakeEmpty();
status_t _Rehash(int32 newSize);
_string_id_hash *_AddString(char *str, int32 id, bool wasMalloced);
virtual _string_id_hash *_FindString(int32 id);
// FBC
virtual status_t _Reserved_ResourceStrings_0(void *);
virtual status_t _Reserved_ResourceStrings_1(void *);
virtual status_t _Reserved_ResourceStrings_2(void *);
virtual status_t _Reserved_ResourceStrings_3(void *);
virtual status_t _Reserved_ResourceStrings_4(void *);
virtual status_t _Reserved_ResourceStrings_5(void *);
}; };
#endif // _RESOURCE_STRINGS_H #endif // _RESOURCE_STRINGS_H
+22 -32
View File
@@ -1,54 +1,44 @@
// ---------------------------------------------------------------------- /*
// This software is part of the OpenBeOS distribution and is covered * Copyright 2002-2010, Haiku, Inc. All Rights Reserved.
// by the OpenBeOS license. * Distributed under the terms of the MIT License.
// */
// File Name: VolumeRoster.h
//
// Description: BVolumeRoster class
// ----------------------------------------------------------------------
/*!
\file VolumeRoster.h
BVolumeRoster interface declarations.
*/
#ifndef _VOLUME_ROSTER_H #ifndef _VOLUME_ROSTER_H
#define _VOLUME_ROSTER_H #define _VOLUME_ROSTER_H
#include <Application.h> #include <Application.h>
#include <SupportDefs.h> #include <SupportDefs.h>
#include <Volume.h> #include <Volume.h>
#ifdef USE_OPENBEOS_NAMESPACE
namespace OpenBeOS {
#endif
class BVolume; class BVolume;
class BMessenger; class BMessenger;
class BVolumeRoster { class BVolumeRoster {
public: public:
BVolumeRoster(); BVolumeRoster();
virtual ~BVolumeRoster(); virtual ~BVolumeRoster();
status_t GetNextVolume(BVolume *volume); status_t GetNextVolume(BVolume* volume);
void Rewind(); void Rewind();
status_t GetBootVolume(BVolume *volume); status_t GetBootVolume(BVolume* volume);
status_t StartWatching(BMessenger messenger = be_app_messenger); status_t StartWatching(
void StopWatching(); BMessenger messenger = be_app_messenger);
BMessenger Messenger() const; void StopWatching();
BMessenger Messenger() const;
private: private:
virtual void _SeveredVRoster1(); virtual void _SeveredVRoster1();
virtual void _SeveredVRoster2(); virtual void _SeveredVRoster2();
int32 fCookie; private:
BMessenger *fTarget; int32 fCookie;
uint32 _reserved[3]; BMessenger* fTarget;
uint32 _reserved[3];
}; };
#ifdef USE_OPENBEOS_NAMESPACE
}
#endif
#endif // _VOLUME_ROSTER_H #endif // _VOLUME_ROSTER_H
+4 -2
View File
@@ -1,6 +1,6 @@
/* /*
* Copyright 2004, Axel Dörfler, [email protected]. All rights reserved. * Copyright 2004, Axel Dörfler, [email protected]. All rights reserved.
* Distributed under the terms of the Haiku License. * Distributed under the terms of the MIT License.
*/ */
#ifndef __FORK_H__ #ifndef __FORK_H__
#define __FORK_H__ #define __FORK_H__
@@ -14,10 +14,12 @@ extern "C" {
#endif #endif
extern status_t __init_fork(void); extern status_t __init_fork(void);
extern status_t __register_atfork(void( *prepare)( void), void( *parent)( void), void( *child)( void)); extern status_t __register_atfork(void(*prepare)(void), void(*parent)(void),
void(*child)(void));
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif
#endif /* __FORK_H__ */ #endif /* __FORK_H__ */
+1 -1
View File
@@ -1,6 +1,6 @@
/* /*
* Copyright 2003, Axel Dörfler, [email protected]. All rights reserved. * Copyright 2003, Axel Dörfler, [email protected]. All rights reserved.
* Distributed under the terms of the OpenBeOS License. * Distributed under the terms of the MIT License.
*/ */
#ifndef _UNICODE_PROPERTIES_H_ #ifndef _UNICODE_PROPERTIES_H_
#define _UNICODE_PROPERTIES_H_ #define _UNICODE_PROPERTIES_H_
+1 -1
View File
@@ -1,5 +1,5 @@
/* /*
* Distributed under the terms of the OpenBeOS License. * Distributed under the terms of the MIT License.
*/ */
#ifndef _NL_TYPES_H_ #ifndef _NL_TYPES_H_
#define _NL_TYPES_H_ #define _NL_TYPES_H_
+7 -4
View File
@@ -1,6 +1,6 @@
/* /*
* Copyright 2004, Axel Dörfler, [email protected]. All rights reserved. * Copyright 2004, Axel Dörfler, [email protected]. All rights reserved.
* Distributed under the terms of the OpenBeOS License. * Distributed under the terms of the MIT License.
*/ */
#ifndef META_FORMAT_H #ifndef META_FORMAT_H
#define META_FORMAT_H #define META_FORMAT_H
@@ -19,7 +19,8 @@ namespace media {
struct meta_format { struct meta_format {
meta_format(); meta_format();
meta_format(const media_format_description &description, const media_format &format, int32 id); meta_format(const media_format_description &description,
const media_format &format, int32 id);
meta_format(const media_format_description &description); meta_format(const media_format_description &description);
meta_format(const meta_format &other); meta_format(const meta_format &other);
@@ -32,8 +33,10 @@ struct meta_format {
int32 id; int32 id;
}; };
typedef status_t (*_MakeFormatHookFunc)(const media_format_description *descriptions, typedef status_t (*_MakeFormatHookFunc)(
int32 descriptionsCount, media_format *format, uint32 flags); const media_format_description *descriptions, int32 descriptionsCount,
media_format *format, uint32 flags);
extern _MakeFormatHookFunc _gMakeFormatHook; extern _MakeFormatHookFunc _gMakeFormatHook;
} // namespace media } // namespace media
+1 -1
View File
@@ -1,6 +1,6 @@
/* /*
* Copyright 2004, Axel Dörfler, [email protected]. All rights reserved. * Copyright 2004, Axel Dörfler, [email protected]. All rights reserved.
* Distributed under the terms of the OpenBeOS License. * Distributed under the terms of the MIT License.
*/ */
#ifndef _MIME_TYPES_H #ifndef _MIME_TYPES_H
#define _MIME_TYPES_H #define _MIME_TYPES_H
+3 -1
View File
@@ -1,10 +1,11 @@
/* /*
* Copyright 2004, Axel Dörfler, [email protected]. All rights reserved. * Copyright 2004, Axel Dörfler, [email protected]. All rights reserved.
* Distributed under the terms of the Haiku License. * Distributed under the terms of the MIT License.
*/ */
#ifndef _KERNEL_REAL_TIME_DATA_H #ifndef _KERNEL_REAL_TIME_DATA_H
#define _KERNEL_REAL_TIME_DATA_H #define _KERNEL_REAL_TIME_DATA_H
#include <StorageDefs.h> #include <StorageDefs.h>
#include <SupportDefs.h> #include <SupportDefs.h>
@@ -15,4 +16,5 @@ struct real_time_data {
struct arch_real_time_data arch_data; struct arch_real_time_data arch_data;
}; };
#endif /* _KERNEL_REAL_TIME_DATA_H */ #endif /* _KERNEL_REAL_TIME_DATA_H */
@@ -1,14 +1,16 @@
/* /*
* Copyright 2004, Axel Dörfler, [email protected]. All rights reserved. * Copyright 2004, Axel Dörfler, [email protected]. All rights reserved.
* Distributed under the terms of the Haiku License. * Distributed under the terms of the MIT License.
*/ */
#ifndef _SYSTEM_SYSCALL_PROCESS_INFO_H #ifndef _SYSTEM_SYSCALL_PROCESS_INFO_H
#define _SYSTEM_SYSCALL_PROCESS_INFO_H #define _SYSTEM_SYSCALL_PROCESS_INFO_H
enum which_process_info { enum which_process_info {
SESSION_ID = 1, SESSION_ID = 1,
GROUP_ID, GROUP_ID,
PARENT_ID, PARENT_ID,
}; };
#endif /* _SYSTEM_SYSCALL_PROCESS_INFO_H */ #endif /* _SYSTEM_SYSCALL_PROCESS_INFO_H */