Skip to content
This repository has been archived by the owner on Aug 4, 2019. It is now read-only.

Make audio/video work on OS X #120

Closed
dvor opened this issue Aug 19, 2015 · 3 comments
Closed

Make audio/video work on OS X #120

dvor opened this issue Aug 19, 2015 · 3 comments

Comments

@dvor
Copy link
Member

dvor commented Aug 19, 2015

Platform dependent should be wrapped to

#if TARGET_OS_IPHONE
    // do iOS stuff
#else
    // do OS X stuff
#endif

However this should be avoid if possible. For example UIView can be replaced with OCTView, which would be typedef'd to UIView or NSView somewhere in the code.

@dvor dvor added this to the Audio/video milestone Aug 19, 2015
@stal888
Copy link
Contributor

stal888 commented Sep 3, 2015

Maybe OCTAudioEngine and OCTVideoEngine should be made user-serviceable (as in file conduits)?
We could provide separate iOS and OS X implementations without a lot of preprocessor stuff.

@dvor
Copy link
Member Author

dvor commented Sep 3, 2015

It depends on how much common code they both have. For example if you'll look at AudioEngine, all code it has is suitable for both iOS and OS X, differences are in

  • creating image from pixels buffer here
  • orientation change (which is only iOS specific) here.

So there would be just 2 macros for whole engine which is not that bad.

@dvor
Copy link
Member Author

dvor commented Mar 21, 2016

Done

@dvor dvor closed this as completed Mar 21, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants